Skip to content

Commit 5a8aa30

Browse files
committed
[InstCombine] Add more tests. NFC.
1 parent 2b1fe7e commit 5a8aa30

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

llvm/test/Transforms/InstCombine/fpcast.ll

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,17 @@ define half @test3_fabs_ninf(float %a) {
6262
ret half %c
6363
}
6464

65+
define half @test3_fptrunc_ninf(float %a) {
66+
; CHECK-LABEL: @test3_fptrunc_ninf(
67+
; CHECK-NEXT: [[TMP1:%.*]] = fptrunc float [[A:%.*]] to half
68+
; CHECK-NEXT: [[C:%.*]] = call ninf half @llvm.fabs.f16(half [[TMP1]])
69+
; CHECK-NEXT: ret half [[C]]
70+
;
71+
%b = call float @llvm.fabs.f32(float %a)
72+
%c = fptrunc ninf float %b to half
73+
ret half %c
74+
}
75+
6576
define half @fneg_fptrunc(float %a) {
6677
; CHECK-LABEL: @fneg_fptrunc(
6778
; CHECK-NEXT: [[TMP1:%.*]] = fptrunc float [[A:%.*]] to half

0 commit comments

Comments
 (0)