• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=nvptx -mcpu=sm_10 | FileCheck %s
2; RUN: llc < %s -march=nvptx64 -mcpu=sm_10 | FileCheck %s
3; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
4; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
5
6define ptx_device float @test_fabsf(float %f) {
7; CHECK: abs.f32 %f0, %f0;
8; CHECK: ret;
9	%x = call float @llvm.fabs.f32(float %f)
10	ret float %x
11}
12
13define ptx_device double @test_fabs(double %d) {
14; CHECK: abs.f64 %fl0, %fl0;
15; CHECK: ret;
16	%x = call double @llvm.fabs.f64(double %d)
17	ret double %x
18}
19
20declare float @llvm.fabs.f32(float)
21declare double @llvm.fabs.f64(double)
22