[llvm-bugs] [Bug 37390] -reassociate runs forever
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri May 11 08:46:10 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37390
Davide Italiano <davide at freebsd.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Davide Italiano <davide at freebsd.org> ---
dcci at Davides-MacBook-Pro ~/w/l/llvm> git svn dcommit --interactive
Committing to https://llvm.org/svn/llvm-project/llvm/trunk ...
commit 8c88b7846a8120179850d6ba485ae731aba20982
Author: Davide Italiano <ditaliano at apple.com>
Date: Fri May 11 08:42:01 2018 -0700
[Reassociate] Prevent infinite loops when processing PHIs.
Phi nodes can reside in live blocks but one of their incoming
arguments can come from a dead block. Dead blocks and reassociate
don't play nice together. In fact, reassociate performs an RPO
as a first step to avoid processing dead blocks.
The reason why Reassociate might not fixpoint when examining
dead blocks is that the following:
%xor0 = xor i16 %xor1, undef
%xor1 = xor i16 %xor0, undef
is perfectly valid LLVM IR (if it appears in a dead block),
so the worklist algorithm keeps pushing the two instructions for
reexamination. Note that this is not Reassociate fault, at least
not entirely. It's llvm that has a weird definition of dominance.
Fixes PR37390.
create mode 100644 test/Transforms/Reassociate/infloop-deadphi.ll
Commit this patch to SVN? ([y]es (default)|[n]o|[q]uit|[a]ll): y
A test/Transforms/Reassociate/infloop-deadphi.ll
M lib/Transforms/Scalar/Reassociate.cpp
Committed r332100
M lib/Target/AMDGPU/AMDGPUISelLowering.cpp
A test/CodeGen/AMDGPU/partial-shift-shrink.ll
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180511/d0fc3d0c/attachment-0001.html>
More information about the llvm-bugs
mailing list