From: Sanjay Patel Date: Thu, 12 Sep 2019 17:07:01 +0000 (+0000) Subject: [InstCombine] reduce test noise and regenerate CHECK lines; NFC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9dc12bebaa5eac00d87663012df01bb9c7f6d08b;p=llvm [InstCombine] reduce test noise and regenerate CHECK lines; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371746 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Transforms/InstCombine/fpextend.ll b/test/Transforms/InstCombine/fpextend.ll index 9b5986c2f4e..0b2d985bfb2 100644 --- a/test/Transforms/InstCombine/fpextend.ll +++ b/test/Transforms/InstCombine/fpextend.ll @@ -3,114 +3,98 @@ define float @test(float %x) nounwind { ; CHECK-LABEL: @test( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP34:%.*]] = fadd float [[X:%.*]], 0.000000e+00 -; CHECK-NEXT: ret float [[TMP34]] +; CHECK-NEXT: [[T34:%.*]] = fadd float [[X:%.*]], 0.000000e+00 +; CHECK-NEXT: ret float [[T34]] ; -entry: - %tmp1 = fpext float %x to double - %tmp3 = fadd double %tmp1, 0.000000e+00 - %tmp34 = fptrunc double %tmp3 to float - ret float %tmp34 + %t1 = fpext float %x to double + %t3 = fadd double %t1, 0.000000e+00 + %t34 = fptrunc double %t3 to float + ret float %t34 } define float @test2(float %x, float %y) nounwind { ; CHECK-LABEL: @test2( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP56:%.*]] = fmul float [[X:%.*]], [[Y:%.*]] -; CHECK-NEXT: ret float [[TMP56]] +; CHECK-NEXT: [[T56:%.*]] = fmul float [[X:%.*]], [[Y:%.*]] +; CHECK-NEXT: ret float [[T56]] ; -entry: - %tmp1 = fpext float %x to double - %tmp23 = fpext float %y to double - %tmp5 = fmul double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext float %x to double + %t23 = fpext float %y to double + %t5 = fmul double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 } define float @test3(float %x, float %y) nounwind { ; CHECK-LABEL: @test3( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP56:%.*]] = fdiv float [[X:%.*]], [[Y:%.*]] -; CHECK-NEXT: ret float [[TMP56]] +; CHECK-NEXT: [[T56:%.*]] = fdiv float [[X:%.*]], [[Y:%.*]] +; CHECK-NEXT: ret float [[T56]] ; -entry: - %tmp1 = fpext float %x to double - %tmp23 = fpext float %y to double - %tmp5 = fdiv double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext float %x to double + %t23 = fpext float %y to double + %t5 = fdiv double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 } define float @test4(float %x) nounwind { ; CHECK-LABEL: @test4( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP34:%.*]] = fsub float -0.000000e+00, [[X:%.*]] -; CHECK-NEXT: ret float [[TMP34]] +; CHECK-NEXT: [[T34:%.*]] = fsub float -0.000000e+00, [[X:%.*]] +; CHECK-NEXT: ret float [[T34]] ; -entry: - %tmp1 = fpext float %x to double - %tmp2 = fsub double -0.000000e+00, %tmp1 - %tmp34 = fptrunc double %tmp2 to float - ret float %tmp34 + %t1 = fpext float %x to double + %t2 = fsub double -0.000000e+00, %t1 + %t34 = fptrunc double %t2 to float + ret float %t34 } define float @test4_unary_fneg(float %x) nounwind { ; CHECK-LABEL: @test4_unary_fneg( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP34:%.*]] = fneg float [[X:%.*]] -; CHECK-NEXT: ret float [[TMP34]] +; CHECK-NEXT: [[T34:%.*]] = fneg float [[X:%.*]] +; CHECK-NEXT: ret float [[T34]] ; -entry: - %tmp1 = fpext float %x to double - %tmp2 = fneg double %tmp1 - %tmp34 = fptrunc double %tmp2 to float - ret float %tmp34 + %t1 = fpext float %x to double + %t2 = fneg double %t1 + %t34 = fptrunc double %t2 to float + ret float %t34 } ; Test with vector splat constant define <2 x float> @test5(<2 x float> %x) nounwind { ; CHECK-LABEL: @test5( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP34:%.*]] = fadd <2 x float> [[X:%.*]], zeroinitializer -; CHECK-NEXT: ret <2 x float> [[TMP34]] +; CHECK-NEXT: [[T34:%.*]] = fadd <2 x float> [[X:%.*]], zeroinitializer +; CHECK-NEXT: ret <2 x float> [[T34]] ; -entry: - %tmp1 = fpext <2 x float> %x to <2 x double> - %tmp3 = fadd <2 x double> %tmp1, - %tmp34 = fptrunc <2 x double> %tmp3 to <2 x float> - ret <2 x float> %tmp34 + %t1 = fpext <2 x float> %x to <2 x double> + %t3 = fadd <2 x double> %t1, + %t34 = fptrunc <2 x double> %t3 to <2 x float> + ret <2 x float> %t34 } ; Test with a non-splat constant define <2 x float> @test6(<2 x float> %x) nounwind { ; CHECK-LABEL: @test6( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP34:%.*]] = fadd <2 x float> [[X:%.*]], -; CHECK-NEXT: ret <2 x float> [[TMP34]] +; CHECK-NEXT: [[T34:%.*]] = fadd <2 x float> [[X:%.*]], +; CHECK-NEXT: ret <2 x float> [[T34]] ; -entry: - %tmp1 = fpext <2 x float> %x to <2 x double> - %tmp3 = fadd <2 x double> %tmp1, - %tmp34 = fptrunc <2 x double> %tmp3 to <2 x float> - ret <2 x float> %tmp34 + %t1 = fpext <2 x float> %x to <2 x double> + %t3 = fadd <2 x double> %t1, + %t34 = fptrunc <2 x double> %t3 to <2 x float> + ret <2 x float> %t34 } ; Test with an undef element ; TODO: Support undef elements. define <2 x float> @test6_undef(<2 x float> %x) nounwind { ; CHECK-LABEL: @test6_undef( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP1:%.*]] = fpext <2 x float> [[X:%.*]] to <2 x double> -; CHECK-NEXT: [[TMP3:%.*]] = fadd <2 x double> [[TMP1]], -; CHECK-NEXT: [[TMP34:%.*]] = fptrunc <2 x double> [[TMP3]] to <2 x float> -; CHECK-NEXT: ret <2 x float> [[TMP34]] +; CHECK-NEXT: [[T1:%.*]] = fpext <2 x float> [[X:%.*]] to <2 x double> +; CHECK-NEXT: [[T3:%.*]] = fadd <2 x double> [[T1]], +; CHECK-NEXT: [[T34:%.*]] = fptrunc <2 x double> [[T3]] to <2 x float> +; CHECK-NEXT: ret <2 x float> [[T34]] ; -entry: - %tmp1 = fpext <2 x float> %x to <2 x double> - %tmp3 = fadd <2 x double> %tmp1, - %tmp34 = fptrunc <2 x double> %tmp3 to <2 x float> - ret <2 x float> %tmp34 + %t1 = fpext <2 x float> %x to <2 x double> + %t3 = fadd <2 x double> %t1, + %t34 = fptrunc <2 x double> %t3 to <2 x float> + ret <2 x float> %t34 } define <2 x float> @not_half_shrinkable(<2 x float> %x) { @@ -146,151 +130,131 @@ define float @test8(half %a) nounwind { define float @test9(half %x, half %y) nounwind { ; CHECK-LABEL: @test9( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = fpext half [[X:%.*]] to float -; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[Y:%.*]] to float -; CHECK-NEXT: [[TMP56:%.*]] = fmul float [[TMP0]], [[TMP1]] -; CHECK-NEXT: ret float [[TMP56]] +; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[X:%.*]] to float +; CHECK-NEXT: [[TMP2:%.*]] = fpext half [[Y:%.*]] to float +; CHECK-NEXT: [[T56:%.*]] = fmul float [[TMP1]], [[TMP2]] +; CHECK-NEXT: ret float [[T56]] ; -entry: - %tmp1 = fpext half %x to double - %tmp23 = fpext half %y to double - %tmp5 = fmul double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext half %x to double + %t23 = fpext half %y to double + %t5 = fmul double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 } define float @test10(half %x, float %y) nounwind { ; CHECK-LABEL: @test10( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = fpext half [[X:%.*]] to float -; CHECK-NEXT: [[TMP56:%.*]] = fmul float [[TMP0]], [[Y:%.*]] -; CHECK-NEXT: ret float [[TMP56]] +; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[X:%.*]] to float +; CHECK-NEXT: [[T56:%.*]] = fmul float [[TMP1]], [[Y:%.*]] +; CHECK-NEXT: ret float [[T56]] ; -entry: - %tmp1 = fpext half %x to double - %tmp23 = fpext float %y to double - %tmp5 = fmul double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext half %x to double + %t23 = fpext float %y to double + %t5 = fmul double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 } define float @test11(half %x) nounwind { ; CHECK-LABEL: @test11( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = fpext half [[X:%.*]] to float -; CHECK-NEXT: [[TMP34:%.*]] = fadd float [[TMP0]], 0.000000e+00 -; CHECK-NEXT: ret float [[TMP34]] +; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[X:%.*]] to float +; CHECK-NEXT: [[T34:%.*]] = fadd float [[TMP1]], 0.000000e+00 +; CHECK-NEXT: ret float [[T34]] ; -entry: - %tmp1 = fpext half %x to double - %tmp3 = fadd double %tmp1, 0.000000e+00 - %tmp34 = fptrunc double %tmp3 to float - ret float %tmp34 + %t1 = fpext half %x to double + %t3 = fadd double %t1, 0.000000e+00 + %t34 = fptrunc double %t3 to float + ret float %t34 } define float @test12(float %x, half %y) nounwind { ; CHECK-LABEL: @test12( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = fpext half [[Y:%.*]] to float -; CHECK-NEXT: [[TMP34:%.*]] = fadd float [[TMP0]], [[X:%.*]] -; CHECK-NEXT: ret float [[TMP34]] +; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[Y:%.*]] to float +; CHECK-NEXT: [[T34:%.*]] = fadd float [[TMP1]], [[X:%.*]] +; CHECK-NEXT: ret float [[T34]] ; -entry: - %tmp1 = fpext float %x to double - %tmp2 = fpext half %y to double - %tmp3 = fadd double %tmp1, %tmp2 - %tmp34 = fptrunc double %tmp3 to float - ret float %tmp34 + %t1 = fpext float %x to double + %t2 = fpext half %y to double + %t3 = fadd double %t1, %t2 + %t34 = fptrunc double %t3 to float + ret float %t34 } define float @test13(half %x, float %y) nounwind { ; CHECK-LABEL: @test13( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = fpext half [[X:%.*]] to float -; CHECK-NEXT: [[TMP56:%.*]] = fdiv float [[TMP0]], [[Y:%.*]] -; CHECK-NEXT: ret float [[TMP56]] +; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[X:%.*]] to float +; CHECK-NEXT: [[T56:%.*]] = fdiv float [[TMP1]], [[Y:%.*]] +; CHECK-NEXT: ret float [[T56]] ; -entry: - %tmp1 = fpext half %x to double - %tmp23 = fpext float %y to double - %tmp5 = fdiv double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext half %x to double + %t23 = fpext float %y to double + %t5 = fdiv double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 } define float @test14(float %x, half %y) nounwind { ; CHECK-LABEL: @test14( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = fpext half [[Y:%.*]] to float -; CHECK-NEXT: [[TMP56:%.*]] = fdiv float [[X:%.*]], [[TMP0]] -; CHECK-NEXT: ret float [[TMP56]] +; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[Y:%.*]] to float +; CHECK-NEXT: [[T56:%.*]] = fdiv float [[X:%.*]], [[TMP1]] +; CHECK-NEXT: ret float [[T56]] ; -entry: - %tmp1 = fpext float %x to double - %tmp23 = fpext half %y to double - %tmp5 = fdiv double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext float %x to double + %t23 = fpext half %y to double + %t5 = fdiv double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 } define float @test15(half %x, half %y) nounwind { ; CHECK-LABEL: @test15( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = fpext half [[X:%.*]] to float -; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[Y:%.*]] to float -; CHECK-NEXT: [[TMP56:%.*]] = fdiv float [[TMP0]], [[TMP1]] -; CHECK-NEXT: ret float [[TMP56]] +; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[X:%.*]] to float +; CHECK-NEXT: [[TMP2:%.*]] = fpext half [[Y:%.*]] to float +; CHECK-NEXT: [[T56:%.*]] = fdiv float [[TMP1]], [[TMP2]] +; CHECK-NEXT: ret float [[T56]] ; -entry: - %tmp1 = fpext half %x to double - %tmp23 = fpext half %y to double - %tmp5 = fdiv double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext half %x to double + %t23 = fpext half %y to double + %t5 = fdiv double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 } define float @test16(half %x, float %y) nounwind { ; CHECK-LABEL: @test16( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = fpext half [[X:%.*]] to float -; CHECK-NEXT: [[TMP1:%.*]] = frem float [[TMP0]], [[Y:%.*]] -; CHECK-NEXT: ret float [[TMP1]] +; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[X:%.*]] to float +; CHECK-NEXT: [[TMP2:%.*]] = frem float [[TMP1]], [[Y:%.*]] +; CHECK-NEXT: ret float [[TMP2]] ; -entry: - %tmp1 = fpext half %x to double - %tmp23 = fpext float %y to double - %tmp5 = frem double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext half %x to double + %t23 = fpext float %y to double + %t5 = frem double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 } define float @test17(float %x, half %y) nounwind { ; CHECK-LABEL: @test17( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = fpext half [[Y:%.*]] to float -; CHECK-NEXT: [[TMP1:%.*]] = frem float [[X:%.*]], [[TMP0]] -; CHECK-NEXT: ret float [[TMP1]] +; CHECK-NEXT: [[TMP1:%.*]] = fpext half [[Y:%.*]] to float +; CHECK-NEXT: [[TMP2:%.*]] = frem float [[X:%.*]], [[TMP1]] +; CHECK-NEXT: ret float [[TMP2]] ; -entry: - %tmp1 = fpext float %x to double - %tmp23 = fpext half %y to double - %tmp5 = frem double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext float %x to double + %t23 = fpext half %y to double + %t5 = frem double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 } define float @test18(half %x, half %y) nounwind { ; CHECK-LABEL: @test18( -; CHECK-NEXT: entry: -; CHECK-NEXT: [[TMP0:%.*]] = frem half [[X:%.*]], [[Y:%.*]] -; CHECK-NEXT: [[TMP56:%.*]] = fpext half [[TMP0]] to float -; CHECK-NEXT: ret float [[TMP56]] +; CHECK-NEXT: [[TMP1:%.*]] = frem half [[X:%.*]], [[Y:%.*]] +; CHECK-NEXT: [[T56:%.*]] = fpext half [[TMP1]] to float +; CHECK-NEXT: ret float [[T56]] ; -entry: - %tmp1 = fpext half %x to double - %tmp23 = fpext half %y to double - %tmp5 = frem double %tmp1, %tmp23 - %tmp56 = fptrunc double %tmp5 to float - ret float %tmp56 + %t1 = fpext half %x to double + %t23 = fpext half %y to double + %t5 = frem double %t1, %t23 + %t56 = fptrunc double %t5 to float + ret float %t56 }