diff options
Diffstat (limited to 'llvm/test/Transforms/InstCombine/fpcast.ll')
-rw-r--r-- | llvm/test/Transforms/InstCombine/fpcast.ll | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/fpcast.ll b/llvm/test/Transforms/InstCombine/fpcast.ll index bfc1de4ff6d..f0f5848ad00 100644 --- a/llvm/test/Transforms/InstCombine/fpcast.ll +++ b/llvm/test/Transforms/InstCombine/fpcast.ll @@ -40,6 +40,18 @@ define half @fneg_fptrunc(float %a) { ret half %c } +; FIXME: This combine isn't working. +define half @unary_fneg_fptrunc(float %a) { +; CHECK-LABEL: @unary_fneg_fptrunc( +; CHECK-NEXT: [[B:%.*]] = fneg float [[A:%.*]] +; CHECK-NEXT: [[C:%.*]] = fptrunc float [[B]] to half +; CHECK-NEXT: ret half [[C]] +; + %b = fneg float %a + %c = fptrunc float %b to half + ret half %c +} + define <2 x half> @fneg_fptrunc_vec_undef(<2 x float> %a) { ; CHECK-LABEL: @fneg_fptrunc_vec_undef( ; CHECK-NEXT: [[TMP1:%.*]] = fptrunc <2 x float> [[A:%.*]] to <2 x half> @@ -51,6 +63,18 @@ define <2 x half> @fneg_fptrunc_vec_undef(<2 x float> %a) { ret <2 x half> %c } +; FIXME: This combine isn't working. +define <2 x half> @unary_fneg_fptrunc_vec(<2 x float> %a) { +; CHECK-LABEL: @unary_fneg_fptrunc_vec( +; CHECK-NEXT: [[B:%.*]] = fneg <2 x float> [[A:%.*]] +; CHECK-NEXT: [[C:%.*]] = fptrunc <2 x float> [[B]] to <2 x half> +; CHECK-NEXT: ret <2 x half> [[C]] +; + %b = fneg <2 x float> %a + %c = fptrunc <2 x float> %b to <2 x half> + ret <2 x half> %c +} + define half @test4-fast(float %a) { ; CHECK-LABEL: @test4-fast( ; CHECK-NEXT: [[TMP1:%.*]] = fptrunc float [[A:%.*]] to half @@ -62,6 +86,18 @@ define half @test4-fast(float %a) { ret half %c } +; FIXME: This combine isn't working. +define half @test4_unary_fneg-fast(float %a) { +; CHECK-LABEL: @test4_unary_fneg-fast( +; CHECK-NEXT: [[B:%.*]] = fneg fast float [[A:%.*]] +; CHECK-NEXT: [[C:%.*]] = fptrunc float [[B]] to half +; CHECK-NEXT: ret half [[C]] +; + %b = fneg fast float %a + %c = fptrunc float %b to half + ret half %c +} + define half @test5(float %a, float %b, float %c) { ; CHECK-LABEL: @test5( ; CHECK-NEXT: [[D:%.*]] = fcmp ogt float [[A:%.*]], [[B:%.*]] |