1 ; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s --check-prefix=CHECK-64
2 ; RUN: llc < %s -mtriple=x86_64-win32 | FileCheck %s --check-prefix=CHECK-64
3 ; RUN: llc < %s -march=x86 | FileCheck %s --check-prefix=CHECK-32
5 ; CHECK-64-LABEL: g64xh:
6 ; CHECK-64: testb $8, {{%ah|%ch}}
8 ; CHECK-32-LABEL: g64xh:
9 ; CHECK-32: testb $8, %ah
11 define void @g64xh(i64 inreg %x) nounwind {
13 %s = icmp eq i64 %t, 0
14 br i1 %s, label %yes, label %no
22 ; CHECK-64-LABEL: g64xl:
23 ; CHECK-64: testb $8, [[A0L:%dil|%cl]]
25 ; CHECK-32-LABEL: g64xl:
26 ; CHECK-32: testb $8, %al
28 define void @g64xl(i64 inreg %x) nounwind {
30 %s = icmp eq i64 %t, 0
31 br i1 %s, label %yes, label %no
39 ; CHECK-64-LABEL: g32xh:
40 ; CHECK-64: testb $8, {{%ah|%ch}}
42 ; CHECK-32-LABEL: g32xh:
43 ; CHECK-32: testb $8, %ah
45 define void @g32xh(i32 inreg %x) nounwind {
47 %s = icmp eq i32 %t, 0
48 br i1 %s, label %yes, label %no
56 ; CHECK-64-LABEL: g32xl:
57 ; CHECK-64: testb $8, [[A0L]]
59 ; CHECK-32-LABEL: g32xl:
60 ; CHECK-32: testb $8, %al
62 define void @g32xl(i32 inreg %x) nounwind {
64 %s = icmp eq i32 %t, 0
65 br i1 %s, label %yes, label %no
73 ; CHECK-64-LABEL: g16xh:
74 ; CHECK-64: testb $8, {{%ah|%ch}}
76 ; CHECK-32-LABEL: g16xh:
77 ; CHECK-32: testb $8, %ah
79 define void @g16xh(i16 inreg %x) nounwind {
81 %s = icmp eq i16 %t, 0
82 br i1 %s, label %yes, label %no
90 ; CHECK-64-LABEL: g16xl:
91 ; CHECK-64: testb $8, [[A0L]]
93 ; CHECK-32-LABEL: g16xl:
94 ; CHECK-32: testb $8, %al
96 define void @g16xl(i16 inreg %x) nounwind {
98 %s = icmp eq i16 %t, 0
99 br i1 %s, label %yes, label %no
107 ; CHECK-64-LABEL: g64x16:
108 ; CHECK-64: testw $-32640, %[[A0W:di|cx]]
110 ; CHECK-32-LABEL: g64x16:
111 ; CHECK-32: testw $-32640, %ax
113 define void @g64x16(i64 inreg %x) nounwind {
114 %t = and i64 %x, 32896
115 %s = icmp eq i64 %t, 0
116 br i1 %s, label %yes, label %no
124 ; CHECK-64-LABEL: g32x16:
125 ; CHECK-64: testw $-32640, %[[A0W]]
127 ; CHECK-32-LABEL: g32x16:
128 ; CHECK-32: testw $-32640, %ax
130 define void @g32x16(i32 inreg %x) nounwind {
131 %t = and i32 %x, 32896
132 %s = icmp eq i32 %t, 0
133 br i1 %s, label %yes, label %no
141 ; CHECK-64-LABEL: g64x32:
142 ; CHECK-64: testl $268468352, %e[[A0W]]
144 ; CHECK-32-LABEL: g64x32:
145 ; CHECK-32: testl $268468352, %eax
147 define void @g64x32(i64 inreg %x) nounwind {
148 %t = and i64 %x, 268468352
149 %s = icmp eq i64 %t, 0
150 br i1 %s, label %yes, label %no