[PATCH] D27879: [AVX-512][InstCombine] Teach InstCombine to turn scalar add/sub/mul/div with rounding intrinsics into normal IR operations if the rounding mode is CUR_DIRECTION.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 09:09:22 PST 2016


RKSimon added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1783
+    // IR operations.
+    if (auto *R = dyn_cast<ConstantInt>(II->getArgOperand(4))) {
+      if (R->getValue() == 4) {
----------------
craig.topper wrote:
> zvi wrote:
> > is if(dync_cast<>) really needed here? Can the cast ever fail?
> You're right the cast can never fail for well formed use of the intrinsic. I'll change it before I commit.
Will something have caught badly formed uses of the intrinsic before this?


https://reviews.llvm.org/D27879





More information about the llvm-commits mailing list