1; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s 2; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s 3 4define ptx_device float @test_fabsf(float %f) { 5; CHECK: abs.f32 %f{{[0-9]+}}, %f{{[0-9]+}}; 6; CHECK: ret; 7 %x = call float @llvm.fabs.f32(float %f) 8 ret float %x 9} 10 11define ptx_device double @test_fabs(double %d) { 12; CHECK: abs.f64 %fd{{[0-9]+}}, %fd{{[0-9]+}}; 13; CHECK: ret; 14 %x = call double @llvm.fabs.f64(double %d) 15 ret double %x 16} 17 18define float @test_nvvm_sqrt(float %a) { 19; CHECK: sqrt.rn.f32 %f{{[0-9]+}}, %f{{[0-9]+}}; 20; CHECK: ret; 21 %val = call float @llvm.nvvm.sqrt.f(float %a) 22 ret float %val 23} 24 25 26declare float @llvm.fabs.f32(float) 27declare double @llvm.fabs.f64(double) 28declare float @llvm.nvvm.sqrt.f(float) 29