Teach instcombine to propagate demanded elements through a masked load or masked gather instruction.
This is in the broader context of improving vector pointer instcombine under https://reviews.llvm.org/D57140.
Paths
| Differential D57372
Demanded elements support for masked.load and masked.gather ClosedPublic Authored by reames on Jan 28 2019, 10:12 PM.
Details Summary Teach instcombine to propagate demanded elements through a masked load or masked gather instruction. This is in the broader context of improving vector pointer instcombine under https://reviews.llvm.org/D57140.
Diff Detail Event Timeline
Comment Actions Address review comment re: naming. I chose DemandedPtrs instead of DemandedPtrVec for consistency w/other variables in the same file.
reames marked an inline comment as done. reames added inline comments.
Comment Actions LGTM
This revision is now accepted and ready to land.Mar 17 2019, 9:11 AM Closed by commit rL356510: Demanded elements support for masked.load and masked.gather (authored by reames). · Explain WhyMar 19 2019, 1:08 PM This revision was automatically updated to reflect the committed changes. Comment Actions Be aware that this patch turned out to contain a nasty miscompile. It's now been fixed in https://reviews.llvm.org/rL358299. I recommend anyone who has branched with this change to consider cherry-picking the fix.
Revision Contents
Diff 190869 lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
test/Transforms/InstCombine/X86/x86-masked-memops.ll
test/Transforms/InstCombine/masked_intrinsics.ll
|
I think DemandedLoad should maybe be called DemandedPtrVec.