[llvm-bugs] [Bug 38446] New: De morgan laws: fold not into other xor

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Aug 4 14:36:04 PDT 2018


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

            Bug ID: 38446
           Summary: De morgan laws: fold not into other xor
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: lebedev.ri at gmail.com
                CC: llvm-bugs at lists.llvm.org

https://rise4fun.com/Alive/8iv

Name: fold xor
  %old0 = icmp slt i32 %x, 0
  %old1 = icmp slt i8 %y, 0
  %old2 = xor i1 %old0, %old1
  %r = xor i1 %old2, true
=>
  %new0 = icmp slt i32 %x, 0
  %new1 = icmp sge i8 %y, 0
  %r = xor i1 %new0, %new1

Name: fold xor, alternative
  %old0 = icmp slt i32 %x, 0
  %old1 = icmp slt i8 %y, 0
  %old2 = xor i1 %old0, %old1
  %r = xor i1 %old2, true
=>
  %new0 = icmp sge i32 %x, 0
  %new1 = icmp slt i8 %y, 0
  %r = xor i1 %new0, %new1

https://godbolt.org/g/Jn8ZKQ

We'll be getting a lot of these from implicit conversion sanitizer.

-- 
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/20180804/8bad7c0d/attachment.html>


More information about the llvm-bugs mailing list