[llvm] [llvm][CodeGen] respect booleanVectorContents while UnrollVSETCC (PR #97589)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 9 08:31:26 PDT 2024
================
@@ -2016,7 +2016,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),
----------------
RKSimon wrote:
@inclyc Maybe try this:
```
Ops[i] = DAG.getNode(ISD::SETCC, dl, MVT::i1, LHSElem, RHSElem, CC);
Ops[i] = DAG.getBoolExtOrTrunc(Ops[i], dl, EltVT, VT);
```
https://github.com/llvm/llvm-project/pull/97589
More information about the llvm-commits
mailing list