
Similar to 806761a7629df268c8aed49657aeccffa6bca449 -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple (e.g. Windows, macOS), leaving a target triple which may not make sense. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize nvptx{,64}-apple-darwin as ELF instead of rejecting it outrightly.
36 lines
1.1 KiB
LLVM
36 lines
1.1 KiB
LLVM
; RUN: llc < %s -mtriple=nvptx64 | FileCheck %s
|
|
; RUN: %if ptxas %{ llc < %s -mtriple=nvptx64 | %ptxas-verify %}
|
|
|
|
; CHECK-LABEL: .func{{.*}}test1
|
|
define float @test1(float %in) local_unnamed_addr {
|
|
; CHECK: rsqrt.approx.f32
|
|
%call = call float @llvm.nvvm.rsqrt.approx.f(float %in)
|
|
ret float %call
|
|
}
|
|
|
|
; CHECK-LABEL: .func{{.*}}test2
|
|
define double @test2(double %in) local_unnamed_addr {
|
|
; CHECK: rsqrt.approx.f64
|
|
%call = call double @llvm.nvvm.rsqrt.approx.d(double %in)
|
|
ret double %call
|
|
}
|
|
|
|
; CHECK-LABEL: .func{{.*}}test3
|
|
define float @test3(float %in) local_unnamed_addr {
|
|
; CHECK: rsqrt.approx.ftz.f32
|
|
%call = tail call float @llvm.nvvm.rsqrt.approx.ftz.f(float %in)
|
|
ret float %call
|
|
}
|
|
|
|
; CHECK-LABEL: .func{{.*}}test4
|
|
define double @test4(double %in) local_unnamed_addr {
|
|
; CHECK: rsqrt.approx.ftz.f64
|
|
%call = tail call double @llvm.nvvm.rsqrt.approx.ftz.d(double %in)
|
|
ret double %call
|
|
}
|
|
|
|
declare float @llvm.nvvm.rsqrt.approx.ftz.f(float)
|
|
declare double @llvm.nvvm.rsqrt.approx.ftz.d(double)
|
|
declare float @llvm.nvvm.rsqrt.approx.f(float)
|
|
declare double @llvm.nvvm.rsqrt.approx.d(double)
|