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: unassignedb...@nondot.org
          Reporter: lebedev...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to