[llvm] r292069 - [NVPTX] Modernize intrinics.ll test.
Justin Lebar via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 15 08:54:57 PST 2017
Author: jlebar
Date: Sun Jan 15 10:54:57 2017
New Revision: 292069
URL: http://llvm.org/viewvc/llvm-project?rev=292069&view=rev
Log:
[NVPTX] Modernize intrinics.ll test.
Modified:
llvm/trunk/test/CodeGen/NVPTX/intrinsics.ll
Modified: llvm/trunk/test/CodeGen/NVPTX/intrinsics.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/NVPTX/intrinsics.ll?rev=292069&r1=292068&r2=292069&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/NVPTX/intrinsics.ll (original)
+++ llvm/trunk/test/CodeGen/NVPTX/intrinsics.ll Sun Jan 15 10:54:57 2017
@@ -1,28 +1,27 @@
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
-define ptx_device float @test_fabsf(float %f) {
-; CHECK: abs.f32 %f{{[0-9]+}}, %f{{[0-9]+}};
-; CHECK: ret;
- %x = call float @llvm.fabs.f32(float %f)
- ret float %x
+; CHECK-LABEL test_fabsf(
+define float @test_fabsf(float %f) {
+; CHECK: abs.f32
+ %x = call float @llvm.fabs.f32(float %f)
+ ret float %x
}
-define ptx_device double @test_fabs(double %d) {
-; CHECK: abs.f64 %fd{{[0-9]+}}, %fd{{[0-9]+}};
-; CHECK: ret;
- %x = call double @llvm.fabs.f64(double %d)
- ret double %x
+; CHECK-LABEL: test_fabs(
+define double @test_fabs(double %d) {
+; CHECK: abs.f64
+ %x = call double @llvm.fabs.f64(double %d)
+ ret double %x
}
+; CHECK-LABEL: test_nvvm_sqrt(
define float @test_nvvm_sqrt(float %a) {
-; CHECK: sqrt.rn.f32 %f{{[0-9]+}}, %f{{[0-9]+}};
-; CHECK: ret;
+; CHECK: sqrt.rn.f32
%val = call float @llvm.nvvm.sqrt.f(float %a)
ret float %val
}
-
declare float @llvm.fabs.f32(float)
declare double @llvm.fabs.f64(double)
declare float @llvm.nvvm.sqrt.f(float)
More information about the llvm-commits
mailing list