[PATCH] D57997: [SDAG] Support vector UMULO/SMULO
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 18 03:44:48 PST 2019
RKSimon added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:981
- DAG.getIntPtrConstant(SmallVT.getSizeInBits(),
- DL));
Overflow = DAG.getSetCC(DL, N->getValueType(1), Hi,
----------------
This needs fixing right away as a separate commit - we should be using getShiftAmountTy. I'm happy for you to use getScalarSizeInBits straight away as well.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:8953
+ SDValue EltRHS = getNode(ISD::EXTRACT_VECTOR_ELT, dl, ResEltVT, RHS,
+ getConstant(i, dl, TLI->getVectorIdxTy(getDataLayout())));
+
----------------
Use ExtractVectorElements ?
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:8963
+ ResScalars.push_back(getUNDEF(ResEltVT));
+ OvScalars.push_back(getUNDEF(OvEltVT));
+ }
----------------
Use append()?
================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:5559
+ } else if (!VT.isVector()) {
// We can fall back to a libcall with an illegal type for the MUL if we
// have a libcall big enough.
----------------
It might be tidier to do:
```
} else {
if (VT.isVector())
return DAG.UnrollVectorOverflowOp(Node);
...
}
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57997/new/
https://reviews.llvm.org/D57997
More information about the llvm-commits
mailing list