[PATCH] D41322: [InstCombine] Missed optimization in math expression: squashing sqrt functions

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 16 09:37:00 PST 2017


davide requested changes to this revision.
davide added inline comments.
This revision now requires changes to proceed.


================
Comment at: test/Transforms/InstCombine/fmul.ll:195-199
+; CHECK-LABEL @sqrt_a_sqrt_b_sqrt_c_sqrt_d(
+; CHECK: fmul fast double %a, %b
+; CHECK: fmul fast double %1, %c
+; CHECK: fmul fast double %2, %d
+; CHECK: call fast double @llvm.sqrt.f64(double %3)
----------------
Please add a negative test showing that this combine doesn't fire unless the conditions are met (allows reassociation/fast-math, etc..)


https://reviews.llvm.org/D41322





More information about the llvm-commits mailing list