[llvm] [GlobalISel] Use G_ANYEXT instead of G_ZEXT for shift amount widening (PR #223136)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 12 21:11:57 PDT 2026
================
@@ -149,7 +149,6 @@ define i1 @test_lshr_i1(i32 %arg1, i32 %arg2) {
; X64-NEXT: movl %edi, %eax
; X64-NEXT: movl %esi, %ecx
; X64-NEXT: andb $1, %al
-; X64-NEXT: andb $1, %cl
----------------
topperc wrote:
This isn't a valid transform. arg2 may have non-zero bits in bits 31:1. The truncate discarded them. We need an AND to do the same in assembly.
https://github.com/llvm/llvm-project/pull/223136
More information about the llvm-commits
mailing list