blob: 0ad014dbf970deb7d2c7db2951e28c5392ceb982 [file] [log] [blame]
Andrew Lenharthe8aebf72005-05-04 15:56:34 +00001; Make sure this testcase codegens to the ctlz instruction
Reid Spencer65f47a32007-04-15 18:40:57 +00002; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev67 | grep -i ctlz
3; RUN: llvm-as < %s | llc -march=alpha -mattr=+CIX | grep -i ctlz
4; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev6 | not grep -i ctlz
5; RUN: llvm-as < %s | llc -march=alpha -mcpu=ev56 | not grep -i ctlz
6; RUN: llvm-as < %s | llc -march=alpha -mattr=-CIX | not grep -i ctlz
Andrew Lenharthd3942b42005-05-04 15:51:07 +00007
Reid Spencer65f47a32007-04-15 18:40:57 +00008declare i32 @llvm.ctlz.i8(i8)
Andrew Lenharthd3942b42005-05-04 15:51:07 +00009
Reid Spencer65f47a32007-04-15 18:40:57 +000010define i32 @bar(i8 %x) {
Andrew Lenharthd3942b42005-05-04 15:51:07 +000011entry:
Reid Spencer65f47a32007-04-15 18:40:57 +000012 %tmp.1 = call i32 @llvm.ctlz.i8( i8 %x )
13 ret i32 %tmp.1
Andrew Lenharthd3942b42005-05-04 15:51:07 +000014}