craig.topper added inline comments.

================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:1955
       setOperationAction(ISD::SCALAR_TO_VECTOR,       MVT::v32f16, Custom);
+      setOperationAction(ISD::SINT_TO_FP,             MVT::v32i16, Legal);
+      setOperationAction(ISD::STRICT_SINT_TO_FP,      MVT::v32i16, Legal);
----------------
LuoYuanke wrote:
> Sorry, I'm just confused on why the type is the same for ISD::SINT_TO_FP and 
> ISD::FP_TO_SINT? The legalization use src type for ISD::SINT_TO_FP and dst 
> type for ISD::FP_TO_SINT? Why not unify to dst type.
This is the rules for how LegalizeDAG.cpp and LegalizeVectorOps looks up the 
operation action for these nodes. It always use the integer type.

I believe this is because for scalar types, there are more legal integer types 
than there are legal conversions. The FP types were already checked for 
legality by the type legalizer. This has gotten a lot more complicated for 
vectors.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105265

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to