[VPlan] Handle equal address and store ops in onlyFirstLaneDemanded.
authorFlorian Hahn <flo@fhahn.com>
Fri, 15 Apr 2022 20:52:46 +0000 (22:52 +0200)
committerFlorian Hahn <flo@fhahn.com>
Fri, 15 Apr 2022 20:53:33 +0000 (22:53 +0200)
commit73f5d7d0d6ec0eb474925f1952fd7b6f92024fa1
tree6f72799b22314503920268d1b43d1233e0bf9e09
parenteab6e94f912d014e6f19e1737ef81e36e4601faf
[VPlan] Handle equal address and store ops in onlyFirstLaneDemanded.

With opaque pointers, the stored value and address can be the same.

Previously the code in VPWidenMemoryInstructionRecipe::onlyFirstLaneDemanded
incorrectly considers stores with matching store and pointer operands as
only demanding the first lane, causing a crash.
llvm/lib/Transforms/Vectorize/VPlan.h
llvm/test/Transforms/LoopVectorize/opaque-ptr.ll