[llvm-bugs] [Bug 52546] New: [InstSimplify] missed X==0 fold of bool value
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 18 07:06:33 PST 2021
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: unassignedbugs at nondot.org
Reporter: spatel+llvm at rotateright.com
CC: llvm-bugs at lists.llvm.org
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211118/e6325ffc/attachment.html>
More information about the llvm-bugs
mailing list