[llvm-bugs] [Bug 46271] New: InstCombine infinite loop

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jun 10 15:39:00 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46271

            Bug ID: 46271
           Summary: InstCombine infinite loop
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: craig.topper at gmail.com
                CC: llvm-bugs at lists.llvm.org

This sequence causes instcombine to run in an infinite loop. It never even its
the max iteration check because we're always adding nodes to the worklist.


define i8 @foo(<2 x i8> %updatedret.i.i.i213) {
  %a = icmp sgt <2 x i8> %updatedret.i.i.i213, <i8 -1, i8 -1>
  %b = select <2 x i1> %a, <2 x i8> %updatedret.i.i.i213, <2 x i8> <i8 undef,
i8 -1>
  %resultvec.i = xor <2 x i8> %b, <i8 undef, i8 -1>
  %storeval.i.1.i = extractelement <2 x i8> %resultvec.i, i32 1
  ret i8 %storeval.i.1.i
}


Extract from https://github.com/ispc/ispc/issues/1788  hopefully this is the
same issue there, but I"m not sure because the full IR hit the max iteration
limit.

-- 
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/20200610/5f08e274/attachment.html>


More information about the llvm-bugs mailing list