[llvm-bugs] [Bug 38915] New: [InstCombine] Infinite loop by operating on same set of instructions in worklist
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Sep 12 07:05:11 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38915
Bug ID: 38915
Summary: [InstCombine] Infinite loop by operating on same set
of instructions in worklist
Product: tools
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: opt
Assignee: unassignedbugs at nondot.org
Reporter: anna at azul.com
CC: llvm-bugs at lists.llvm.org
This test goes into infinite loop when run with InstCombine on llvm ToT:
opt -instcombine test.ll <-- hangs with rerunning IC over the same set of
instructions in the worklist.
test.ll:
define void @baz(i32 %arg) {
bb:
switch i32 undef, label %bb4 [
i32 0, label %bb2
i32 1, label %bb3
i32 2, label %bb1
]
bb1: ; preds = %bb
ret void
bb2: ; preds = %bb
unreachable
bb3: ; preds = %bb
ret void
bb4: ; preds = %bb
%tmp = sub i32 0, %arg
%tmp5 = and i32 %tmp, 3
%tmp6 = sub i32 0, %tmp5
%tmp7 = sub i32 0, %tmp5
%tmp8 = sub i32 -2, %tmp5
%tmp9 = icmp sgt i32 %tmp6, -2147483647
%tmp10 = select i1 %tmp9, i32 %tmp6, i32 -2147483647
%tmp11 = mul i32 %tmp10, -1
%tmp12 = icmp sgt i32 %tmp7, -2147483647
%tmp13 = select i1 %tmp12, i32 %tmp7, i32 -2147483647
%tmp14 = mul i32 %tmp13, -1
%tmp15 = icmp sgt i32 %tmp11, %tmp14
%tmp16 = select i1 %tmp15, i32 %tmp11, i32 %tmp14
%tmp17 = sub i32 -1, %tmp16
%tmp18 = icmp sgt i32 %tmp17, %tmp8
%tmp19 = select i1 %tmp18, i32 %tmp17, i32 %tmp8
%tmp20 = sub i32 -1, %tmp19
%tmp21 = icmp sgt i32 %tmp20, 1
%tmp22 = select i1 %tmp21, i32 %tmp20, i32 1
%tmp23 = add i32 %tmp22, -1
%tmp24 = add i32 %tmp5, -1
%tmp25 = icmp sgt i32 %tmp24, %tmp23
br i1 %tmp25, label %bb26, label %bb27
bb26: ; preds = %bb4
unreachable
bb27: ; preds = %bb4
unreachable
}
--
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/20180912/bc4d7564/attachment-0001.html>
More information about the llvm-bugs
mailing list