Nemanja Ivanovic | 32b5fed | 2016-10-27 05:17:58 +0000 | [diff] [blame] | 1 | ; Function Attrs: nounwind readnone |
| 2 | ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \ |
| 3 | ; RUN: -mcpu=pwr9 < %s | FileCheck %s |
| 4 | |
| 5 | define signext i32 @ctw(i32 signext %a) { |
| 6 | entry: |
| 7 | %0 = tail call i32 @llvm.cttz.i32(i32 %a, i1 false) |
| 8 | ret i32 %0 |
| 9 | ; CHECK-LABEL: ctw |
| 10 | ; CHECK: cnttzw 3, 3 |
| 11 | ; CHECK-NEXT: blr |
| 12 | } |
| 13 | |
| 14 | ; Function Attrs: nounwind readnone |
| 15 | declare i32 @llvm.cttz.i32(i32, i1) |
| 16 | |
| 17 | ; Function Attrs: nounwind readnone |
| 18 | define signext i32 @clw(i32 signext %a) { |
| 19 | entry: |
| 20 | %0 = tail call i32 @llvm.ctlz.i32(i32 %a, i1 false) |
| 21 | ret i32 %0 |
| 22 | ; CHECK-LABEL: clw |
| 23 | ; CHECK: cntlzw 3, 3 |
| 24 | ; CHECK-NEXT: blr |
| 25 | } |
| 26 | |
| 27 | ; Function Attrs: nounwind readnone |
| 28 | declare i32 @llvm.ctlz.i32(i32, i1) |
| 29 | |
| 30 | ; Function Attrs: nounwind readnone |
| 31 | define i64 @ctd(i64 %a) { |
| 32 | entry: |
| 33 | %0 = tail call i64 @llvm.cttz.i64(i64 %a, i1 false) |
| 34 | ret i64 %0 |
| 35 | ; CHECK-LABEL: ctd |
| 36 | ; CHECK: cnttzd 3, 3 |
| 37 | ; CHECK-NEXT: blr |
| 38 | } |
| 39 | |
| 40 | ; Function Attrs: nounwind readnone |
| 41 | declare i64 @llvm.cttz.i64(i64, i1) |
| 42 | |
| 43 | ; Function Attrs: nounwind readnone |
| 44 | define i64 @cld(i64 %a) { |
| 45 | entry: |
| 46 | %0 = tail call i64 @llvm.ctlz.i64(i64 %a, i1 false) |
| 47 | ret i64 %0 |
| 48 | ; CHECK-LABEL: cld |
| 49 | ; CHECK: cntlzd 3, 3 |
| 50 | ; CHECK-NEXT: blr |
| 51 | } |
| 52 | |
| 53 | ; Function Attrs: nounwind readnone |
| 54 | declare i64 @llvm.ctlz.i64(i64, i1) |