[llvm] [LegalizeVectorOps] Use getBoolConstant instead of getAllOnesConstant in VectorLegalizer::UnrollVSETCC. (PR #121526)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 03:38:25 PST 2025


================
@@ -2250,7 +2250,8 @@ SDValue VectorLegalizer::UnrollVSETCC(SDNode *Node) {
                          TLI.getSetCCResultType(DAG.getDataLayout(),
                                                 *DAG.getContext(), TmpEltVT),
                          LHSElem, RHSElem, CC);
-    Ops[i] = DAG.getSelect(dl, EltVT, Ops[i], DAG.getAllOnesConstant(dl, EltVT),
+    Ops[i] = DAG.getSelect(dl, EltVT, Ops[i],
+                           DAG.getBoolConstant(true, dl, EltVT, VT),
                            DAG.getConstant(0, dl, EltVT));
----------------
RKSimon wrote:

Agreed, a fixme comment would be acceptable for now.

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


More information about the llvm-commits mailing list