diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
commit | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch) | |
tree | 5343938942df402b49ec7300a1c25a2d4ccd5821 /test/CodeGen/NVPTX/fsin-no-fast-math.ll | |
parent | 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff) |
Vendor import of llvm trunk r300422:vendor/llvm/llvm-trunk-r300422
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=317017
svn path=/vendor/llvm/llvm-trunk-r300422/; revision=317018; tag=vendor/llvm/llvm-trunk-r300422
Diffstat (limited to 'test/CodeGen/NVPTX/fsin-no-fast-math.ll')
-rw-r--r-- | test/CodeGen/NVPTX/fsin-no-fast-math.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/NVPTX/fsin-no-fast-math.ll b/test/CodeGen/NVPTX/fsin-no-fast-math.ll new file mode 100644 index 000000000000..56396b849250 --- /dev/null +++ b/test/CodeGen/NVPTX/fsin-no-fast-math.ll @@ -0,0 +1,14 @@ +; RUN: not llc < %s -march=nvptx -mcpu=sm_20 2>&1 | FileCheck %s + +; Check that we fail to select fsin without fast-math enabled + +declare float @llvm.sin.f32(float) + +; CHECK: LLVM ERROR: Cannot select: {{.*}}: f32 = fsin +; CHECK: In function: test_fsin_safe +define float @test_fsin_safe(float %a) #0 { + %r = tail call float @llvm.sin.f32(float %a) + ret float %r +} + +attributes #0 = { "unsafe-fp-math" = "false" } |