[PATCH] D43160: [InstSimplify] allow exp/log simplifications with only 'reassoc' FMF

Warren Ristow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 11:29:34 PST 2018


wristow added a comment.

Code change LGTM.  A minor tweak to each test-change (to replace 'fast' with 'reassoc') would test it more precisely.



================
Comment at: test/Transforms/InstSimplify/exp-intrinsic.ll:22
 ;
   %1 = call fast double @llvm.log.f64(double %a)
+  %2 = call reassoc double @llvm.exp.f64(double %1)
----------------
'reassoc' instead of 'fast' should also be all that's needed for the llvm.log.f64 call to enable this transformation.


================
Comment at: test/Transforms/InstSimplify/exp2-intrinsic.ll:22
 ;
   %1 = call fast double @llvm.log2.f64(double %a)
+  %2 = call reassoc double @llvm.exp2.f64(double %1)
----------------
Again, 'reassoc' is all that's needed.


================
Comment at: test/Transforms/InstSimplify/log-intrinsic.ll:22
 ;
   %1 = call fast double @llvm.exp.f64(double %a)
+  %2 = call reassoc double @llvm.log.f64(double %1)
----------------
'reassoc' is all that's needed here, too.


================
Comment at: test/Transforms/InstSimplify/log2-intrinsic.ll:22
 ;
   %1 = call fast double @llvm.exp2.f64(double %a)
+  %2 = call reassoc double @llvm.log2.f64(double %1)
----------------
One last one where 'reassoc' is all that's needed.


https://reviews.llvm.org/D43160





More information about the llvm-commits mailing list