[llvm] [AArch64][FastISel] Fix sign/zero extending arguments with matching sign/zero extend attribute (PR #207985)
Ömer Sinan Ağacan via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 02:53:34 PDT 2026
================
@@ -92,14 +103,24 @@ entry:
ret i32 %conv;
}
-define i64 @zext_i1_i64(i1 zeroext %a) nounwind ssp {
-; CHECK-LABEL: zext_i1_i64:
+define i16 @zext_i1_i16(i1 zeroext %a) nounwind ssp {
+; CHECK-LABEL: zext_i1_i16:
; CHECK: ; %bb.0: ; %entry
-; CHECK-NEXT: ; kill: def $x0 killed $w0
+; CHECK-NEXT: and w0, w0, #0x1
----------------
osa1 wrote:
Note: this looks like a diff from the left-hand side but it's a new test function.
`and` here is generated by the sdag fallback. I think when we fall back to sdag sometimes we don't copy argument attributes, so sdag generates this code because it doesn't know that the argument is `zeroext`.
https://github.com/llvm/llvm-project/pull/207985
More information about the llvm-commits
mailing list