reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
; RUN: llc -march=hexagon < %s | FileCheck %s

target triple = "hexagon"

; Function Attrs: nounwind readnone
define i32 @f0(i32 %a0) #0 {
b0:
; CHECK: cl0
  %v0 = tail call i32 @llvm.ctlz.i32(i32 %a0, i1 true)
  ret i32 %v0
}

; Function Attrs: nounwind readnone speculatable
declare i32 @llvm.ctlz.i32(i32, i1) #1

; Function Attrs: nounwind readnone speculatable
declare i64 @llvm.ctlz.i64(i64, i1) #1

; Function Attrs: nounwind readnone
define i32 @f1(i32 %a0) #0 {
b0:
; CHECK: ct0
  %v0 = tail call i32 @llvm.cttz.i32(i32 %a0, i1 true)
  ret i32 %v0
}

; Function Attrs: nounwind readnone speculatable
declare i32 @llvm.cttz.i32(i32, i1) #1

; Function Attrs: nounwind readnone speculatable
declare i64 @llvm.cttz.i64(i64, i1) #1

; Function Attrs: nounwind readnone
define i32 @f2(i64 %a0) #0 {
b0:
; CHECK: cl0
  %v0 = tail call i64 @llvm.ctlz.i64(i64 %a0, i1 true)
  %v1 = trunc i64 %v0 to i32
  ret i32 %v1
}

; Function Attrs: nounwind readnone
define i32 @f3(i64 %a0) #0 {
b0:
; CHECK: ct0
  %v0 = tail call i64 @llvm.cttz.i64(i64 %a0, i1 true)
  %v1 = trunc i64 %v0 to i32
  ret i32 %v1
}

attributes #0 = { nounwind readnone }
attributes #1 = { nounwind readnone speculatable }