8817e224984bc1ce1be6d15fb2006a43d5df21b4
[oota-llvm.git] / test / CodeGen / X86 / bmi.ll
1 ; RUN: llc < %s -march=x86-64 -mattr=+bmi | FileCheck %s
2
3 define i32 @t1(i32 %x) nounwind  {
4         %tmp = tail call i32 @llvm.cttz.i32( i32 %x )
5         ret i32 %tmp
6 ; CHECK: t1:
7 ; CHECK: tzcntl
8 }
9
10 declare i32 @llvm.cttz.i32(i32) nounwind readnone
11
12 define i16 @t2(i16 %x) nounwind  {
13         %tmp = tail call i16 @llvm.cttz.i16( i16 %x )
14         ret i16 %tmp
15 ; CHECK: t2:
16 ; CHECK: tzcntw
17 }
18
19 declare i16 @llvm.cttz.i16(i16) nounwind readnone
20
21 define i64 @t3(i64 %x) nounwind  {
22         %tmp = tail call i64 @llvm.cttz.i64( i64 %x )
23         ret i64 %tmp
24 ; CHECK: t3:
25 ; CHECK: tzcntq
26 }
27
28 declare i64 @llvm.cttz.i64(i64) nounwind readnone
29
30 define i8 @t4(i8 %x) nounwind  {
31         %tmp = tail call i8 @llvm.cttz.i8( i8 %x )
32         ret i8 %tmp
33 ; CHECK: t4:
34 ; CHECK: tzcntw
35 }
36
37 declare i8 @llvm.cttz.i8(i8) nounwind readnone
38