[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.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 21 09:05:08 PST 2016


craig.topper 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) {
----------------
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.


https://reviews.llvm.org/D27879





More information about the llvm-commits mailing list