[PATCH] D67074: [LV] Fix miscompiles by adding non-header PHI nodes to AllowedExit

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 2 05:27:41 PDT 2019


bjope created this revision.
bjope added reviewers: fhahn, Ayal.
Herald added subscribers: rkruppe, hiraditya.
Herald added a project: LLVM.
bjope added a parent revision: D67072: [LV] Precommit test case showing miscompile from PR43166. NFC.

Fold-tail currently supports reduction last-vector-value live-out's,
but has yet to support last-scalar-value live-outs, including
non-header phi's. As it relies on AllowedExit in order to detect
them and bail out we need to add the non-header PHI nodes to
AllowedExit, otherwise we end up with miscompiles.

Solves https://bugs.llvm.org/show_bug.cgi?id=43166


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D67074

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
  llvm/test/Transforms/LoopVectorize/lv-fold-tail-by-masking-bug.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67074.218337.patch
Type: text/x-patch
Size: 11462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190902/271e78c1/attachment.bin>


More information about the llvm-commits mailing list