[PATCH] D93238: [VectorCombine] make load transform poison-safe

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 12:21:56 PST 2020


spatel created this revision.
spatel added reviewers: lebedev.ri, nlopes, aqjune, RKSimon.
Herald added subscribers: pengfei, hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a project: LLVM.

As noted in D93229 <https://reviews.llvm.org/D93229>, the transform from scalar load to vector load potentially leaks poison from the extra vector elements that are being loaded.

We could use `freeze` here (and x86 codegen at least appears to be the same either way), but we already have a shuffle in this logic to optionally change the vector size, so let's allow that instruction to serve both purposes.


https://reviews.llvm.org/D93238

Files:
  llvm/lib/Transforms/Vectorize/VectorCombine.cpp
  llvm/test/Transforms/VectorCombine/X86/load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93238.311670.patch
Type: text/x-patch
Size: 10520 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201214/d4cab85c/attachment.bin>


More information about the llvm-commits mailing list