[PATCH] D16691: [InstCombine] simplify masked load intrinsics with constant masks
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 01:56:53 PST 2016
delena accepted this revision.
delena added a comment.
This revision is now accepted and ready to land.
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.
yes, for zero mask it can be optimized.
More information about the llvm-commits