[PATCH] D55897: Add constrained fptrunc and fpext intrinsics

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 31 14:19:32 PST 2019


craig.topper added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:710
 
+SDValue DAGTypeLegalizer::ScalarizeVecOp_STRICT_FP_ROUND(SDNode *N, 
+                                                         unsigned OpNo) {
----------------
What makes us reach this case? I would expect we'd scalarize based on the result type before we got to the operand type.


================
Comment at: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:3058
+      Ops[0] = InOp;
+      SDValue InVec = DAG.getNode(ISD::CONCAT_VECTORS, DL, InWidenVT, Ops);
+
----------------
We can't really widen this can we? Won't that put garbage in the upper elements?


================
Comment at: test/CodeGen/X86/vector-constrained-fp-intrinsics.ll:2566
+entry:
+  %result = call <4 x double> @llvm.experimental.constrained.fpext.v4f64.v4f32(
+                                <4 x float><float 42.0, float 43.0,
----------------
Please add an AVX command line so v4f64 will be a legal type.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55897/new/

https://reviews.llvm.org/D55897





More information about the llvm-commits mailing list