[llvm-bugs] [Bug 52547] New: [InstCombine] missed fold of icmp-of-casted-shift
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Nov 18 07:13:38 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=52547
Bug ID: 52547
Summary: [InstCombine] missed fold of icmp-of-casted-shift
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 - we may be able to generalize this further for
other constant values, but here's a missed sub-pattern based on that test:
define i1 @src(i32 %a) {
%shl = shl i32 1, %a
%t = trunc i32 %shl to i8
%r = icmp eq i8 %t, 0
ret i1 %r
}
define i1 @tgt(i32 %a) {
%r = icmp ugt i32 %a, 7
ret i1 %r
}
https://alive2.llvm.org/ce/z/mmkPup
And the 'ne' sibling:
https://alive2.llvm.org/ce/z/ftWEQz
--
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/83cf5fb7/attachment-0001.html>
More information about the llvm-bugs
mailing list