[llvm] [Instcombine] Avoid widening trunc+sext to trunc+shl+ashr when not profitable (PR #160483)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 29 09:36:44 PDT 2025


================
@@ -320,6 +320,17 @@ define i10 @test19(i10 %i) {
   ret i10 %d
 }
 
+define i32 @test20(i64 %i) {
----------------
dtcxzyw wrote:

InstCombine doesn't change this test even without your patch (i16 is a legal type in this file).
Please change i16 to another illegal integer type or move the test into a separate file with a suitable data layout.


https://github.com/llvm/llvm-project/pull/160483


More information about the llvm-commits mailing list