[llvm] [VPlan] Support VPWidenCastRecipe in isSingleScalar. (PR #143552)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 6 00:49:49 PST 2025
================
@@ -18,8 +18,9 @@ define void @minbw_cast(ptr %dst, i64 %n, i1 %bool1, i1 %bool2) {
; CHECK-NEXT: [[BROADCAST_SPLAT2:%.*]] = shufflevector <4 x i32> [[BROADCAST_SPLATINSERT1]], <4 x i32> poison, <4 x i32> zeroinitializer
; CHECK-NEXT: [[TMP0:%.*]] = trunc <4 x i32> [[BROADCAST_SPLAT2]] to <4 x i8>
; CHECK-NEXT: [[TMP1:%.*]] = zext <4 x i1> [[BROADCAST_SPLAT]] to <4 x i8>
-; CHECK-NEXT: [[TMP2:%.*]] = xor <4 x i8> [[TMP0]], [[TMP1]]
-; CHECK-NEXT: [[TMP3:%.*]] = extractelement <4 x i8> [[TMP2]], i32 3
+; CHECK-NEXT: [[TMP2:%.*]] = extractelement <4 x i8> [[TMP0]], i32 0
+; CHECK-NEXT: [[TMP5:%.*]] = extractelement <4 x i8> [[TMP1]], i32 0
----------------
Mel-Chen wrote:
Let’s just go ahead with #166514.
By the way, I think if we want to avoid introducing extra extracts, we should try to support narrowing for all the recipes that isSingleScalar supports. Since isSingleScalar is only derived layer-by-layer, it doesn’t guarantee that the recipes that eventually provide the operands will actually be narrowed in narrowToSingleScalarRecipes.
https://github.com/llvm/llvm-project/pull/143552
More information about the llvm-commits
mailing list