@@ -467,8 +467,6 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
467
467
addRegisterClass (MVT::v2bf16, &NVPTX::Int32RegsRegClass);
468
468
469
469
// Conversion to/from FP16/FP16x2 is always legal.
470
- setOperationAction (ISD::SINT_TO_FP, MVT::f16 , Legal);
471
- setOperationAction (ISD::FP_TO_SINT, MVT::f16 , Legal);
472
470
setOperationAction (ISD::BUILD_VECTOR, MVT::v2f16, Custom);
473
471
setOperationAction (ISD::EXTRACT_VECTOR_ELT, MVT::v2f16, Custom);
474
472
setOperationAction (ISD::INSERT_VECTOR_ELT, MVT::v2f16, Expand);
@@ -478,8 +476,6 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
478
476
setFP16OperationAction (ISD::SETCC, MVT::v2f16, Legal, Expand);
479
477
480
478
// Conversion to/from BFP16/BFP16x2 is always legal.
481
- setOperationAction (ISD::SINT_TO_FP, MVT::bf16 , Legal);
482
- setOperationAction (ISD::FP_TO_SINT, MVT::bf16 , Legal);
483
479
setOperationAction (ISD::BUILD_VECTOR, MVT::v2bf16, Custom);
484
480
setOperationAction (ISD::EXTRACT_VECTOR_ELT, MVT::v2bf16, Custom);
485
481
setOperationAction (ISD::INSERT_VECTOR_ELT, MVT::v2bf16, Expand);
@@ -644,6 +640,13 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
644
640
setI16x2OperationAction (ISD::SREM, MVT::v2i16, Legal, Custom);
645
641
setI16x2OperationAction (ISD::UREM, MVT::v2i16, Legal, Custom);
646
642
643
+ // Other arithmetic and logic ops are unsupported.
644
+ setOperationAction ({ISD::AND, ISD::OR, ISD::XOR, ISD::SDIV, ISD::UDIV,
645
+ ISD::SRA, ISD::SRL, ISD::MULHS, ISD::MULHU,
646
+ ISD::FP_TO_SINT, ISD::FP_TO_UINT, ISD::SINT_TO_FP,
647
+ ISD::UINT_TO_FP},
648
+ MVT::v2i16, Expand);
649
+
647
650
setOperationAction (ISD::ADDC, MVT::i32 , Legal);
648
651
setOperationAction (ISD::ADDE, MVT::i32 , Legal);
649
652
setOperationAction (ISD::SUBC, MVT::i32 , Legal);
0 commit comments