https://bugs.llvm.org/show_bug.cgi?id=49543
Bug ID: 49543
Summary: [InstCombine] Failure to fold sext(trunc(ashr(x,bw-1))
-> sext(ashr(x,bw-1)
Product: libraries
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Scalar Optimizations
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
Alive2: https://alive2.llvm.org/ce/z/A3FMem
define i64 @src(i32 %a0) {
%a = ashr i32 %a0, 16 ; all valid 16 -> 31
%b = trunc i32 %a to i16
%c = sext i16 %b to i64
ret i64 %c
}
define i64 @tgt(i32 %a0) {
%a = ashr i32 %a0, 16
%c = sext i32 %a to i64
ret i64 %c
}
https://c.godbolt.org/z/zh7ffM
--
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