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

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 18 03:07:34 PDT 2016


delena added a comment.

Actually, I wanted to put this pattern:
def : Pat<(v4i32 (fp_to_sint (v2f64 VR128:$src))),

  (CVTTPD2DQrr VR128:$src)>;

But if you say that it's impossible, you can use your variant.
I also tried to simplify, whenever it's possible, the huge switch of ReplaceNodeResults() and offload the lowering into a separate function.
LowerFP_TO_SINT() may return illegal result if the node VT is illegal, but you can do the same in any other function
LowerFP_TO_SINT_v2i32(), for example.
You also may handle UINT in the same way:
if (VT == MVT::v2i32) {

  if (IsSigned)
    LowerFP_TO_SINT_v2i32()
  else
   LowerFP_TO_UINT_v2i32()

} else

  // scalar types


Repository:
  rL LLVM

https://reviews.llvm.org/D23808





More information about the llvm-commits mailing list