[PATCH] D49507: [Power9] Add __float128 support in the backend for bitcast to a i128
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 19 03:28:51 PDT 2018
nemanjai added inline comments.
================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:14314
+ const SDValue &Op0 = N->getOperand(0);
+ if (Op0.getValueType() == MVT::i128 && N->getValueType(0) == MVT::i64) {
+ bool BigEndian = DCI.DAG.getDataLayout().isBigEndian();
----------------
This logic is fairly deeply nested. Can you convert some of the conditions to early exits. This one certainly looks to fit the bill.
================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:14331
+ if (Op0.getOperand(0).getValueType() == MVT::i128 &&
+ ConstNode && ConstNode->getZExtValue() == 64 &&
+ Op0.getOperand(0).getNode()->getOpcode() == ISD::BITCAST) {
----------------
For clarity, please do the null pointer check first.
https://reviews.llvm.org/D49507
More information about the llvm-commits
mailing list