• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Function Attrs: nounwind readnone
2; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \
3; RUN:   -mcpu=pwr9 < %s | FileCheck %s
4
5define signext i32 @ctw(i32 signext %a) {
6entry:
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
15declare i32 @llvm.cttz.i32(i32, i1)
16
17; Function Attrs: nounwind readnone
18define signext i32 @clw(i32 signext %a) {
19entry:
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
28declare i32 @llvm.ctlz.i32(i32, i1)
29
30; Function Attrs: nounwind readnone
31define i64 @ctd(i64 %a) {
32entry:
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
41declare i64 @llvm.cttz.i64(i64, i1)
42
43; Function Attrs: nounwind readnone
44define i64 @cld(i64 %a) {
45entry:
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
54declare i64 @llvm.ctlz.i64(i64, i1)
55