[llvm] [LegalizeTypes] Allow v1i128 as a valid SETCC result type during vector operand scalarization (PR #216136)

Maryam Moghadas via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 13:09:40 PDT 2026


================
@@ -1120,13 +1114,16 @@ SDValue DAGTypeLegalizer::ScalarizeVecOp_VSELECT(SDNode *N) {
 }
 
 /// If the operand is a vector that needs to be scalarized then the
-/// result must be v1i1, so just convert to a scalar SETCC and wrap
-/// with a scalar_to_vector since the res type is legal if we got here
+/// result must be v1i1 or v1i128, so just convert to a scalar SETCC
+/// and wrap with a scalar_to_vector since the res type is legal if we
+/// got here
 SDValue DAGTypeLegalizer::ScalarizeVecOp_VSETCC(SDNode *N) {
   assert(N->getValueType(0).isVector() &&
          N->getOperand(0).getValueType().isVector() &&
          "Operand types must be vectors");
-  assert(N->getValueType(0) == MVT::v1i1 && "Expected v1i1 type");
+  assert(
----------------
maryammo wrote:

Updated to `getVectorNumElements() == 1` as suggested below. 

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


More information about the llvm-commits mailing list