[PATCH] D67366: [CGP] Ensure sinking multiple instructions does not invalidate dominance checks
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 9 13:15:04 PDT 2019
dmgreen created this revision.
dmgreen added reviewers: fhahn, samparker, samtebbs, efriedma.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
In MVE, as of rL371218 <https://reviews.llvm.org/rL371218>, we are attempting to sink chains of instructions such as:
%l1 = insertelement <8 x i8> undef, i8 %l0, i32 0
%broadcast.splat26 = shufflevector <8 x i8> %l1, <8 x i8> undef, <8 x i32> zeroinitializer
In certain situations though, we can end up breaking the dominance relations of instructions. This happens when we sink the instruction into a loop, but cannot remove the originals. The Use is updated, which might in fact be a Use from the second instruction to the first.
This attempts to fix that by reversing the order of instruction that are sunk, and ensuring that we update the uses on new instructions if they have already been sunk, not the old ones.
https://reviews.llvm.org/D67366
Files:
llvm/lib/CodeGen/CodeGenPrepare.cpp
llvm/test/Transforms/CodeGenPrepare/ARM/sink-add-mul-shufflevector.ll
llvm/test/Transforms/CodeGenPrepare/ARM/sinkchain.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67366.219416.patch
Type: text/x-patch
Size: 9487 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190909/d0bd3e6e/attachment.bin>
More information about the llvm-commits
mailing list