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
6 ; CHECK-64: testb $8, {{%ah|%ch}}
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
23 ; CHECK-64: testb $8, [[A0L:%dil|%cl]]
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
40 ; CHECK-64: testb $8, {{%ah|%ch}}
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
57 ; CHECK-64: testb $8, [[A0L]]
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
74 ; CHECK-64: testb $8, {{%ah|%ch}}
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
91 ; CHECK-64: testb $8, [[A0L]]
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
108 ; CHECK-64: testw $-32640, %[[A0W:di|cx]]
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
125 ; CHECK-64: testw $-32640, %[[A0W]]
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
142 ; CHECK-64: testl $268468352, %e[[A0W]]
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