blob: fba60227f83019bc31395cb8b1c3d0ed556403af [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Make sure this testcase codegens to the ctlz instruction
2; 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
7
Chandler Carrutha228e392007-08-04 01:51:18 +00008declare i8 @llvm.ctlz.i8(i8)
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009
10define i32 @bar(i8 %x) {
11entry:
Chandler Carrutha228e392007-08-04 01:51:18 +000012 %tmp.1 = call i8 @llvm.ctlz.i8( i8 %x )
13 %tmp.2 = sext i8 %tmp.1 to i32
14 ret i32 %tmp.2
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015}