[PATCH] D16691: [InstCombine] simplify masked load intrinsics with constant masks
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 31 08:51:41 PST 2016
spatel added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:680
@@ -679,3 +679,3 @@
static Value *simplifyMinnumMaxnum(const IntrinsicInst &II) {
Value *Arg0 = II.getArgOperand(0);
----------------
Thanks. I think the verifier has a hole - it doesn't confirm that the alignment operand is constant. But I've removed the assertions here because it does confirm the other things.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:907
@@ +906,3 @@
+ // case Intrinsic::masked_store:
+ // case Intrinsic::masked_gather:
+ // case Intrinsic::masked_scatter:
----------------
Please correct me if I've misunderstood, but I think scatter and gather each have one degenerate folding opportunity that we can handle here:
1. A scatter with zero mask is a nop.
2. A gather with zero mask will return the passthru arg.
http://reviews.llvm.org/D16691
More information about the llvm-commits
mailing list