[llvm] [InstCombine] Remove some of the complexity-based canonicalization (PR #91185)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 23:23:32 PDT 2024
================
@@ -648,8 +648,11 @@ define float @fadd_reduce_sqr_sum_varA_order2(float %a, float %b) {
define float @fadd_reduce_sqr_sum_varA_order3(float %a, float %b) {
; CHECK-LABEL: @fadd_reduce_sqr_sum_varA_order3(
-; CHECK-NEXT: [[TMP1:%.*]] = fadd reassoc nsz float [[A:%.*]], [[B:%.*]]
-; CHECK-NEXT: [[ADD:%.*]] = fmul reassoc nsz float [[TMP1]], [[TMP1]]
+; CHECK-NEXT: [[A_SQ:%.*]] = fmul float [[A:%.*]], [[A]]
+; CHECK-NEXT: [[TWO_A:%.*]] = fmul float [[A]], 2.000000e+00
+; CHECK-NEXT: [[TWO_A_PLUS_B:%.*]] = fadd float [[TWO_A]], [[B:%.*]]
+; CHECK-NEXT: [[MUL:%.*]] = fmul float [[B]], [[TWO_A_PLUS_B]]
+; CHECK-NEXT: [[ADD:%.*]] = fadd reassoc nsz float [[MUL]], [[A_SQ]]
----------------
nikic wrote:
I think this one got fixed as a side-effect of https://github.com/llvm/llvm-project/commit/0d335f78e45341db53d9f956adcebbb2d2616c9a as well.
https://github.com/llvm/llvm-project/pull/91185
More information about the llvm-commits
mailing list