mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-22 12:08:26 +00:00
[NVPTX] Modernize intrinics.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292069 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
352f7fdadc
commit
be5157f530
@ -1,28 +1,27 @@
|
|||||||
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
|
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
|
||||||
; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
|
; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
|
||||||
|
|
||||||
define ptx_device float @test_fabsf(float %f) {
|
; CHECK-LABEL test_fabsf(
|
||||||
; CHECK: abs.f32 %f{{[0-9]+}}, %f{{[0-9]+}};
|
define float @test_fabsf(float %f) {
|
||||||
; CHECK: ret;
|
; CHECK: abs.f32
|
||||||
%x = call float @llvm.fabs.f32(float %f)
|
%x = call float @llvm.fabs.f32(float %f)
|
||||||
ret float %x
|
ret float %x
|
||||||
}
|
}
|
||||||
|
|
||||||
define ptx_device double @test_fabs(double %d) {
|
; CHECK-LABEL: test_fabs(
|
||||||
; CHECK: abs.f64 %fd{{[0-9]+}}, %fd{{[0-9]+}};
|
define double @test_fabs(double %d) {
|
||||||
; CHECK: ret;
|
; CHECK: abs.f64
|
||||||
%x = call double @llvm.fabs.f64(double %d)
|
%x = call double @llvm.fabs.f64(double %d)
|
||||||
ret double %x
|
ret double %x
|
||||||
}
|
}
|
||||||
|
|
||||||
|
; CHECK-LABEL: test_nvvm_sqrt(
|
||||||
define float @test_nvvm_sqrt(float %a) {
|
define float @test_nvvm_sqrt(float %a) {
|
||||||
; CHECK: sqrt.rn.f32 %f{{[0-9]+}}, %f{{[0-9]+}};
|
; CHECK: sqrt.rn.f32
|
||||||
; CHECK: ret;
|
|
||||||
%val = call float @llvm.nvvm.sqrt.f(float %a)
|
%val = call float @llvm.nvvm.sqrt.f(float %a)
|
||||||
ret float %val
|
ret float %val
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
declare float @llvm.fabs.f32(float)
|
declare float @llvm.fabs.f32(float)
|
||||||
declare double @llvm.fabs.f64(double)
|
declare double @llvm.fabs.f64(double)
|
||||||
declare float @llvm.nvvm.sqrt.f(float)
|
declare float @llvm.nvvm.sqrt.f(float)
|
||||||
|
Loading…
Reference in New Issue
Block a user