Skip to content

Commit faaae66

Browse files
authored
LowerTypeTests: Precommit test for generated x86 asm.
Reviewers: fmayer Reviewed By: fmayer Pull Request: #143189
1 parent 5823e92 commit faaae66

File tree

1 file changed

+20
-0
lines changed
  • llvm/test/Transforms/LowerTypeTests

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
; REQUIRES: x86-registered-target
2+
; RUN: opt -mtriple=x86_64-unknown-linux -S -passes=lowertypetests -lowertypetests-summary-action=import -lowertypetests-read-summary=%S/Inputs/import.yaml %s | llc | FileCheck %s
3+
4+
define void @call(ptr %p) {
5+
; CHECK: movl $__typeid_allones7_global_addr, %eax
6+
; CHECK-NEXT: movq %rdi, %rcx
7+
; CHECK-NEXT: subq %rax, %rcx
8+
; CHECK-NEXT: rorq $__typeid_allones7_align, %rcx
9+
; CHECK-NEXT: cmpq $__typeid_allones7_size_m1@ABS8, %rcx
10+
%x = call i1 @llvm.type.test(ptr %p, metadata !"allones7")
11+
br i1 %x, label %t, label %f
12+
13+
t:
14+
call void %p()
15+
ret void
16+
17+
f:
18+
ret void
19+
}
20+

0 commit comments

Comments
 (0)