[llvm-bugs] [Bug 43053] New: [InstCombine] fold clamp of 2-value range

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Aug 19 13:04:45 PDT 2019


            Bug ID: 43053
           Summary: [InstCombine] fold clamp of 2-value range
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: spatel+llvm at rotateright.com
                CC: llvm-bugs at lists.llvm.org

Forking this off from bug 39898 because it's morphed into something different
than it started as:

Pre: C2 == C1 - 1
  %cmp1 = icmp slt i32 %num, C1
  %s1 = select i1 %cmp1, i32 %num, i32 C1
  %cmp2 = icmp sgt i32 %s1, C2
  %r = select i1 %cmp2, i32 %s1, i32 C2
  %cmp3 = icmp sgt %num, C2
  %z = zext i1 %cmp3 to i32
  %r = add i32 %z, C2


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/20190819/59d61c25/attachment.html>

More information about the llvm-bugs mailing list