[PATCH] D100663: [LV] Add undef incoming value to loop-exit phis for the middle-block.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 16 10:19:10 PDT 2021


fhahn created this revision.
fhahn added reviewers: reames, Ayal, rengolin, gilr.
Herald added subscribers: javed.absar, hiraditya.
fhahn requested review of this revision.
Herald added a project: LLVM.

LV temporarily creates invalid IR, which can trip over SCEV. In
particular, LV adds a new branch to the exit block of the scalar loop.
This means the PHIs in the loop exit block now are invalid. To avoid
issues with SCEV, add an undef incoming value for the middle-block. This
will later be replaced by the concrete value after vectorization.

Fixes PR49538, PR49900.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D100663

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/scev-verify-ir.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100663.338165.patch
Type: text/x-patch
Size: 5362 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210416/da8df1bc/attachment.bin>


More information about the llvm-commits mailing list