[mips][mips64r6] ll, sc, lld, and scd are re-encoded on MIPS32r6/MIPS64r6.
[oota-llvm.git] / test / CodeGen / Mips / mips64countleading.ll
1 ; RUN: llc -march=mips64el -mcpu=mips4 < %s | FileCheck -check-prefix=CHECK -check-prefix=MIPS4 %s
2 ; RUN: llc -march=mips64el -mcpu=mips64 < %s | FileCheck -check-prefix=CHECK -check-prefix=MIPS64 %s
3
4 define i64 @t1(i64 %X) nounwind readnone {
5 entry:
6 ; CHECK-LABEL: t1:
7 ; MIPS4-NOT: dclz
8 ; MIPS64: dclz
9   %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %X, i1 true)
10   ret i64 %tmp1
11 }
12
13 declare i64 @llvm.ctlz.i64(i64, i1) nounwind readnone
14
15 define i64 @t3(i64 %X) nounwind readnone {
16 entry:
17 ; CHECK-LABEL: t3:
18 ; MIPS4-NOT: dclo
19 ; MIPS64: dclo
20   %neg = xor i64 %X, -1
21   %tmp1 = tail call i64 @llvm.ctlz.i64(i64 %neg, i1 true)
22   ret i64 %tmp1
23 }
24