File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
llvm/test/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,28 @@ define half @test3_fast(float %a) {
4040 ret half %c
4141}
4242
43+ define half @test3_both_ninf (float %a ) {
44+ ; CHECK-LABEL: @test3_both_ninf(
45+ ; CHECK-NEXT: [[TMP1:%.*]] = fptrunc float [[A:%.*]] to half
46+ ; CHECK-NEXT: [[C:%.*]] = call ninf half @llvm.fabs.f16(half [[TMP1]])
47+ ; CHECK-NEXT: ret half [[C]]
48+ ;
49+ %b = call ninf float @llvm.fabs.f32 (float %a )
50+ %c = fptrunc ninf float %b to half
51+ ret half %c
52+ }
53+
54+ define half @test3_fabs_ninf (float %a ) {
55+ ; CHECK-LABEL: @test3_fabs_ninf(
56+ ; CHECK-NEXT: [[TMP1:%.*]] = fptrunc float [[A:%.*]] to half
57+ ; CHECK-NEXT: [[C:%.*]] = call ninf half @llvm.fabs.f16(half [[TMP1]])
58+ ; CHECK-NEXT: ret half [[C]]
59+ ;
60+ %b = call ninf float @llvm.fabs.f32 (float %a )
61+ %c = fptrunc float %b to half
62+ ret half %c
63+ }
64+
4365define half @fneg_fptrunc (float %a ) {
4466; CHECK-LABEL: @fneg_fptrunc(
4567; CHECK-NEXT: [[TMP1:%.*]] = fptrunc float [[A:%.*]] to half
You can’t perform that action at this time.
0 commit comments