[PATCH] D56987: [Intrinsic] Expand SMULFIX to MUL, MULH[US], or [US]MUL_LOHI on vector arguments
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 24 10:17:19 PST 2019
RKSimon added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:5367
+ // [us]mul.fix(a, b, 0) -> mul(a, b)
+ if (!Scale && isOperationLegalOrCustom(ISD::MUL, VT))
+ return DAG.getNode(ISD::MUL, dl, VT, LHS, RHS);
----------------
Doesn't this have to be:
```
if (!Scale) {
if(VT.isVector() && !isOperationLegalOrCustom(ISD::MUL, VT)))
return SDValue();
return DAG.getNode(ISD::MUL, dl, VT, LHS, RHS);
}
```
otherwise scale == 0 cases can fall through and cause undef for out of range shifts.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56987/new/
https://reviews.llvm.org/D56987
More information about the llvm-commits
mailing list