[PATCH] D53346: [PowerPC] Keep vector int to fp conversions in vector domain
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 19 05:29:46 PDT 2018
nemanjai added inline comments.
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:7276
+ EVT EltVT = VecVT.getVectorElementType();
+ unsigned WideNum = 128 / EltVT.getSizeInBits();
+ EVT WideVT = EVT::getVectorVT(*DAG.getContext(), EltVT, WideNum);
----------------
I think more appropriate names to illustrate how these are being used are something like:
`WideNum -> WideNumElts`
`SourceNum -> NumConcat`
`Sources -> Ops` or `Sources -> ConcatSources`
================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:7310
+ ShuffV.push_back(i + WideNum);
+ ShuffV[0] = 0;
+ ShuffV[WideNum / 2] = 1;
----------------
This works for LE, but not for BE. You should probably change it to something like:
```
if (Subtarget.isLittleEndian()) {
ShuffV[0] = 0;
ShuffV[WideNum / 2] = 1;
} else {
ShuffV[WideNum / 2 - 1] = 0;
ShuffV[WideNum - 1] = 1;
}
```
And add a big endian run line to the test case.
Repository:
rL LLVM
https://reviews.llvm.org/D53346
More information about the llvm-commits
mailing list