From be5157f53083bae552f59fc30f93283e4ddb5036 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Sun, 15 Jan 2017 16:54:57 +0000 Subject: [PATCH] [NVPTX] Modernize intrinics.ll test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292069 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/NVPTX/intrinsics.ll | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/test/CodeGen/NVPTX/intrinsics.ll b/test/CodeGen/NVPTX/intrinsics.ll index 06a8712c210..70a9ac2e325 100644 --- a/test/CodeGen/NVPTX/intrinsics.ll +++ b/test/CodeGen/NVPTX/intrinsics.ll @@ -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) -- 2.50.1