[llvm] [NVPTX] Custom lower integer<->bf16 conversions for sm_80 (PR #74827)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 10:56:27 PST 2023


================
@@ -766,6 +766,12 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM,
       AddPromotedToType(Op, MVT::bf16, MVT::f32);
   }
 
+  for (MVT VT : {MVT::i1, MVT::i16, MVT::i32, MVT::i64}) {
+    setOperationAction(
+        {ISD::SINT_TO_FP, ISD::UINT_TO_FP, ISD::FP_TO_SINT, ISD::FP_TO_UINT},
----------------
Artem-B wrote:

Should we make it conditional on SM/PTX here, instead of checking in the custom lowering?

https://github.com/llvm/llvm-project/pull/74827


More information about the llvm-commits mailing list