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

Pradeep Kumar via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 23 03:06:49 PST 2024


================
@@ -0,0 +1,10 @@
+; RUN: llc < %s -march=nvptx64 | FileCheck %s
+; RUN: %if ptxas %{ llc < %s -march=nvptx64 | %ptxas-verify %}
+
+define float @div_full(float %a, float %b) {
+  ; CHECK: div.full.f32 {{%f[0-9]+}}, {{%f[0-9]+}}, {{%f[0-9]+}}
+  %1 = call float @llvm.nvvm.div.full(float %a, float %b)
+  ; CHECK: div.full.ftz.f32 {{%f[0-9]+}}, {{%f[0-9]+}}, {{%f[0-9]+}}
+  %2 = call float @llvm.nvvm.div.full.ftz(float %1, float %b)
+  ret float %2
+}
----------------
schwarzschild-radius wrote:

Added new line to the file

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


More information about the llvm-commits mailing list