]> granicus.if.org Git - llvm/commit
[LV] Fix miscompiles by adding non-header PHI nodes to AllowedExit
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Tue, 3 Sep 2019 09:33:55 +0000 (09:33 +0000)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Tue, 3 Sep 2019 09:33:55 +0000 (09:33 +0000)
commitb915bf3d8ac9252dedad3a19d0d1cca97480dfbc
tree56ea4e512fee5bb01cab3554a5ac8924c3b8e5e4
parente101e036b269122000a2a65e4097d92b5357a5e5
[LV] Fix miscompiles by adding non-header PHI nodes to AllowedExit

Summary:
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

Reviewers: fhahn, Ayal

Reviewed By: fhahn, Ayal

Subscribers: anna, hiraditya, rkruppe, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67074

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370721 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
test/Transforms/LoopVectorize/pr43166-fold-tail-by-masking.ll