[PATCH] D41342: [InstCombine] Missed optimization in math expression: simplify calls exp functions

Dmitry Venikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 30 06:00:45 PST 2019


Quolyk marked an inline comment as done.
Quolyk added inline comments.


================
Comment at: test/Transforms/InstCombine/fmul-exp2.ll:74
+; CHECK-NEXT:    [[TMP2:%.*]] = fadd reassoc double [[TMP1]], [[D:%.*]]
+; CHECK-NEXT:    [[TMP3:%.*]] = call reassoc double @llvm.exp2.f64(double [[TMP2]])
+; CHECK-NEXT:    ret double [[TMP3]]
----------------
lebedev.ri wrote:
> Hm that is interesting, somehow i have never seen that before.
> So the FMF can be set on such intrinsic calls too.
> Here, we only need `reassoc` on the original `fmul`, not the `exp`?
I've been experimenting with this. As @spatel mentioned we need minimum `reassoc` calls here. So as it appears we need all `fmul reassoc`, however `call double` doesn't need `reassoc`.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D41342





More information about the llvm-commits mailing list