[PATCH] D109954: [InstCombine] powi(x, y) * powi(x, z) -> powi(x, y + z)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 19 07:09:30 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/powi.ll:227-230
   %p1 = tail call double @llvm.powi.f64.i32(double %x, i32 %z)
   tail call void @use(double %p1)
   %p2 = tail call double @llvm.powi.f64.i32(double %x, i32 %y)
   %mul = fmul reassoc double %p2, %p1
----------------
I don't think this actually tests the pattern that we want. We just swapped the names of y and z, so it's functionally the same as the previous test. Just commute the fmul operands instead?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109954/new/

https://reviews.llvm.org/D109954



More information about the llvm-commits mailing list