[PATCH] D102574: [InstCombine] Missed optimization for pow(x, y) * pow(x, z) with fast-math
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 7 03:29:16 PDT 2021
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/test/Transforms/InstCombine/fmul-pow.ll:105
; CHECK-LABEL: @pow_ab_reassoc_extra_use(
-; CHECK-NEXT: [[TMP1:%.*]] = call double @llvm.pow.f64(double [[A:%.*]], double [[B:%.*]])
-; CHECK-NEXT: [[MUL:%.*]] = fmul reassoc double [[TMP1]], [[TMP1]]
-; CHECK-NEXT: call void @use(double [[TMP1]])
+; CHECK-NEXT: [[POW:%.*]] = call double @llvm.pow.f64(double [[A:%.*]], double [[B:%.*]])
+; CHECK-NEXT: [[MUL:%.*]] = fmul reassoc double [[POW]], [[POW]]
----------------
vdsered wrote:
> spatel wrote:
> > Do you know why you are getting this (and similar) test changes? They are cosmetic (value names differ), but I don't see this when testing locally.
> I have seen recently how update_test_checks warned about using tmps in tests so I thought of renaming. It doesn't say anything for these tests however... Updated the patch to remove the naming diff and see the actual changes in output for tests
Ah - yes, the script will warn if it sees IR like:
%tmp1 = fmul float %x, %y
...because the script is creating FileCheck variables for unnamed values in IR (`%1`) with names like `TMP1` (as we see in the examples in this patch). I don't see any potential conflicts with these tests.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102574/new/
https://reviews.llvm.org/D102574
More information about the llvm-commits
mailing list