Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: test/CodeGen/NVPTX/intrinsics.ll

Issue 183273009: Prep for merging 3.4: Undo changes from 3.3 branch (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Retry Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/CodeGen/NVPTX/i1-param.ll ('k') | test/CodeGen/NVPTX/refl1.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s 1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
2 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s 2 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
3 3
4 define ptx_device float @test_fabsf(float %f) { 4 define ptx_device float @test_fabsf(float %f) {
5 ; CHECK: abs.f32 %f0, %f0; 5 ; CHECK: abs.f32 %f0, %f0;
6 ; CHECK: ret; 6 ; CHECK: ret;
7 %x = call float @llvm.fabs.f32(float %f) 7 %x = call float @llvm.fabs.f32(float %f)
8 ret float %x 8 ret float %x
9 } 9 }
10 10
11 define ptx_device double @test_fabs(double %d) { 11 define ptx_device double @test_fabs(double %d) {
12 ; CHECK: abs.f64 %fl0, %fl0; 12 ; CHECK: abs.f64 %fl0, %fl0;
13 ; CHECK: ret; 13 ; CHECK: ret;
14 %x = call double @llvm.fabs.f64(double %d) 14 %x = call double @llvm.fabs.f64(double %d)
15 ret double %x 15 ret double %x
16 } 16 }
17 17
18 define float @test_nvvm_sqrt(float %a) {
19 %val = call float @llvm.nvvm.sqrt.f(float %a)
20 ret float %val
21 }
22
23
24 declare float @llvm.fabs.f32(float) 18 declare float @llvm.fabs.f32(float)
25 declare double @llvm.fabs.f64(double) 19 declare double @llvm.fabs.f64(double)
26 declare float @llvm.nvvm.sqrt.f(float)
OLDNEW
« no previous file with comments | « test/CodeGen/NVPTX/i1-param.ll ('k') | test/CodeGen/NVPTX/refl1.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698