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

            Bug ID: 52546
           Summary: [InstSimplify] missed X==0 fold of bool value
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Forking this off from bug 52543 :

define i1 @src(i1 %b) {
  %not = xor i1 %b, true
  %s = sext i1 %not to i32
  %cmp = icmp eq i32 %s, 0
  ret i1 %cmp
}

define i1 @tgt(i1 %b) {
  ret i1 %b
}


Note that "opt -instcombine" gets this example, and "opt -instsimplify" gets
the sibling fold when the predicate is "ne", but we miss this:
https://alive2.llvm.org/ce/z/vGKMJA

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to