[PATCH] D23808: [X86][SSE] Add lowering to cvttpd2dq/cvttps2dq for sitofp v2f64/2f32 to 2i32

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 4 06:51:51 PDT 2016


RKSimon marked an inline comment as done.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:22229
@@ -22227,1 +22228,3 @@
 
+    if (IsSigned && N->getValueType(0) == MVT::v2i32) {
+      assert(Subtarget.hasSSE2() && "Requires at least SSE2!");
----------------
As the result type is the illegal v2i32 type we need to use ReplaceNodeResults - we can't just go direct to Lower_FP_TO_SINT as type legalization will get in the way.

================
Comment at: lib/Target/X86/X86ISelLowering.cpp:22234
@@ +22233,3 @@
+        SDValue Idx = DAG.getIntPtrConstant(0, dl);
+        SDValue Res = DAG.getNode(X86ISD::CVTTPD2DQ, dl, MVT::v4i32, Src);
+        Res = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MVT::v2i32, Res, Idx);
----------------
See above.


Repository:
  rL LLVM

https://reviews.llvm.org/D23808





More information about the llvm-commits mailing list