[PATCH] D49507: [Power9] Add __float128 support in the backend for bitcast to a i128

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 11:21:54 PDT 2018


efriedma added inline comments.


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:14324
+      SDValue Bitcast = DCI.DAG.getBitcast(MVT::v2i64, Op0.getOperand(0));
+      return DCI.DAG.getNode(ISD::EXTRACT_VECTOR_ELT, dl, MVT::i64, Bitcast, DCI.DAG.getTargetConstant(0, dl, TCVT));
+    }
----------------
80 columns.

I assume you want something like `(uint32_t)DAG.getDataLayout().isBigEndian()` here, not "0".


================
Comment at: lib/Target/PowerPC/PPCISelLowering.cpp:14330
+        Op0.getOperand(0).getValueType() == MVT::i128 &&
+        Op0.getConstantOperandVal(1) == 64 &&
+        Op0.getOperand(0).getNode()->getOpcode() == ISD::BITCAST) {
----------------
The second operand of the shift might not be a constant; getConstantOperandVal will crash in that case.


https://reviews.llvm.org/D49507





More information about the llvm-commits mailing list