[llvm] [InstCombine] Allow folding casts into PNs if both from/to types are illegal (PR #171675)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 24 08:34:07 PST 2025
================
@@ -13,8 +13,10 @@ declare void @usevec4(<2 x i4>)
define i16 @t0(i8 %x) {
; CHECK-LABEL: @t0(
-; CHECK-NEXT: [[TMP1:%.*]] = ashr i8 [[X:%.*]], 4
-; CHECK-NEXT: [[C:%.*]] = sext i8 [[TMP1]] to i16
+; CHECK-NEXT: [[A:%.*]] = lshr i8 [[X:%.*]], 4
----------------
dtcxzyw wrote:
We have the same issue for patterns involving three legal types: https://godbolt.org/z/6qrW8hEoE
https://github.com/llvm/llvm-project/pull/171675
More information about the llvm-commits
mailing list