[llvm-bugs] [Bug 27065] New: BasicBlock::removePredecessor generates self-referencing instructions
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Mar 25 03:36:16 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27065
Bug ID: 27065
Summary: BasicBlock::removePredecessor generates
self-referencing instructions
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Transformation Utilities
Assignee: unassignedbugs at nondot.org
Reporter: tobias at grosser.es
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16088
--> https://llvm.org/bugs/attachment.cgi?id=16088&action=edit
Infinitely running test case
BasicBlock::removePredecessor will eliminate PHI nodes entirely if they always
evaluate to a single constant value and instead replace all uses of the PHINode
with this constant.
This is only correct if we know that the actual constant actually dominates the
PHI node, which is not verified in this code. As a result, we may generate self
referencing instructions which is not only incorrect but also causes an
infinite loop in -load-combine, which does not expect such IR.
This command does not terminate for me, as jump-treading uses removePredecessor
and introduces the incorrect IR that load-combine can not handle:
opt /tmp/infinite.ll -jump-threading -load-combine
--
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/20160325/d8e0d2d2/attachment-0001.html>
More information about the llvm-bugs
mailing list