[VPlan] Only generate single instr for unpredicated stores of varying value to invari...
authorPhilip Reames <preames@rivosinc.com>
Thu, 22 Sep 2022 15:47:19 +0000 (08:47 -0700)
committerPhilip Reames <listmail@philipreames.com>
Thu, 22 Sep 2022 15:53:46 +0000 (08:53 -0700)
commit32dc1151e20dd20b89f8d6ab118c5c56df2e8dd9
treee42390ec9f10a4b410e3c8d0ee7ac6daed047e5e
parent92d71c615de100475b4eb1516b332ed3145a3d60
[VPlan] Only generate single instr for unpredicated stores of varying value to invariant address

This extends the previously added uniform store case to handle stores of loop varying values to a loop invariant address. Note that the placement of this code only allows unpredicated stores; this is important for correctness. (That is "IsPredicated" is always false at this point in the function.)

This patch does not include scalable types. The diff felt "large enough" as it were; I'll handle that in a separate patch. (It requires some changes to cost modeling.)

Differential Revision: https://reviews.llvm.org/D133580
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/sve-illegal-type.ll
llvm/test/Transforms/LoopVectorize/RISCV/illegal-type.ll
llvm/test/Transforms/LoopVectorize/X86/cost-model-assert.ll
llvm/test/Transforms/LoopVectorize/X86/illegal-parallel-loop-uniform-write.ll
llvm/test/Transforms/LoopVectorize/X86/pr36524.ll
llvm/test/Transforms/LoopVectorize/X86/uniform_mem_op.ll
llvm/test/Transforms/LoopVectorize/pr44488-predication.ll
llvm/test/Transforms/LoopVectorize/pr47343-expander-lcssa-after-cfg-update.ll