• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=mips < %s | FileCheck %s
2
3; CHECK: clz $2, $4
4define i32 @t1(i32 %X) nounwind readnone {
5entry:
6  %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X, i1 true)
7  ret i32 %tmp1
8}
9
10declare i32 @llvm.ctlz.i32(i32, i1) nounwind readnone
11
12; CHECK: clz $2, $4
13define i32 @t2(i32 %X) nounwind readnone {
14entry:
15  %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %X, i1 true)
16  ret i32 %tmp1
17}
18
19; CHECK: clo $2, $4
20define i32 @t3(i32 %X) nounwind readnone {
21entry:
22  %neg = xor i32 %X, -1
23  %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg, i1 true)
24  ret i32 %tmp1
25}
26
27; CHECK: clo $2, $4
28define i32 @t4(i32 %X) nounwind readnone {
29entry:
30  %neg = xor i32 %X, -1
31  %tmp1 = tail call i32 @llvm.ctlz.i32(i32 %neg, i1 true)
32  ret i32 %tmp1
33}
34