1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/CodeGen/Hexagon/count_0s.ll
Krzysztof Parzyszek 66abdd815e [Hexagon] Add more lit tests
llvm-svn: 327271
2018-03-12 14:01:28 +00:00

53 lines
1.2 KiB
LLVM

; 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 }