[llvm] [LLVM][NVPTX] Add support for div.full instruction (PR #116482)

Artem Belevich via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 11:48:23 PST 2024


================
@@ -1096,6 +1096,18 @@ def INT_NVVM_DIV_RM_D : F_MATH_2<"div.rm.f64 \t$dst, $src0, $src1;",
 def INT_NVVM_DIV_RP_D : F_MATH_2<"div.rp.f64 \t$dst, $src0, $src1;",
   Float64Regs, Float64Regs, Float64Regs, int_nvvm_div_rp_d>;
 
+def : Pat<(int_nvvm_div_full Float32Regs:$a, Float32Regs:$b),
----------------
Artem-B wrote:

One particular problem this patch may run into is that `FDIV32ri*` records are predicated on `do_DIVF32_FULL`, and that would be affected by the command line option `nvptx-prec-divf32`. For the intrinsic, you want to emit `div.full` unconditionally.

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


More information about the llvm-commits mailing list