[PATCH] D70148: [SLP] fix miscompile on min/max reductions with extra uses (PR43948)
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 06:43:19 PST 2019
ABataev added a comment.
In D70148#1750726 <https://reviews.llvm.org/D70148#1750726>, @spatel wrote:
> Reopening - reverted here:
> rG6f1cc4151a5a <https://reviews.llvm.org/rG6f1cc4151a5ad297b2d1d87d98e266f9729100e2>
>
> Looks like we need to adjust the IR insert point for the cmp (the whole reduction?) because we may create invalid IR otherwise ("Instruction does not dominate all uses!").
Seems to me, need to fix the code in line 6745. Instead of `Builder.SetInsertPoint(cast<Instruction>(ReductionRoot));` need to set the insertion point to the CMPInst if ReductionRoot is `SelectInst`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70148/new/
https://reviews.llvm.org/D70148
More information about the llvm-commits
mailing list