summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AMDGPU/fadd64.ll
diff options
context:
space:
mode:
authorAlexander Timofeev <Alexander.Timofeev@amd.com>2017-07-04 17:32:00 +0000
committerAlexander Timofeev <Alexander.Timofeev@amd.com>2017-07-04 17:32:00 +0000
commit982aee6a38ed7b416bfd2ba67f2144148251f733 (patch)
tree46cc47fedf5dc80cd04d83a71845dfaaf09a3a23 /llvm/test/CodeGen/AMDGPU/fadd64.ll
parentada4ddc0bc49d1837ad296e2d269568c8f632d35 (diff)
downloadbcm5719-llvm-982aee6a38ed7b416bfd2ba67f2144148251f733.tar.gz
bcm5719-llvm-982aee6a38ed7b416bfd2ba67f2144148251f733.zip
[AMDGPU] Switch scalarize global loads ON by default
Differential revision: https://reviews.llvm.org/D34407 llvm-svn: 307097
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/fadd64.ll')
-rw-r--r--llvm/test/CodeGen/AMDGPU/fadd64.ll12
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/fadd64.ll b/llvm/test/CodeGen/AMDGPU/fadd64.ll
index c936d98673b..8fd1f52006f 100644
--- a/llvm/test/CodeGen/AMDGPU/fadd64.ll
+++ b/llvm/test/CodeGen/AMDGPU/fadd64.ll
@@ -5,8 +5,11 @@
; CHECK: v_add_f64 {{v[[0-9]+:[0-9]+]}}, {{v[[0-9]+:[0-9]+]}}, {{v[[0-9]+:[0-9]+]}}
define amdgpu_kernel void @v_fadd_f64(double addrspace(1)* %out, double addrspace(1)* %in1,
double addrspace(1)* %in2) {
- %r0 = load double, double addrspace(1)* %in1
- %r1 = load double, double addrspace(1)* %in2
+ %tid = call i32 @llvm.amdgcn.workitem.id.x()
+ %gep1 = getelementptr inbounds double, double addrspace(1)* %in1, i32 %tid
+ %gep2 = getelementptr inbounds double, double addrspace(1)* %in2, i32 %tid
+ %r0 = load double, double addrspace(1)* %gep1
+ %r1 = load double, double addrspace(1)* %gep2
%r2 = fadd double %r0, %r1
store double %r2, double addrspace(1)* %out
ret void
@@ -42,3 +45,8 @@ define amdgpu_kernel void @s_fadd_v2f64(<2 x double> addrspace(1)* %out, <2 x do
store <2 x double> %r2, <2 x double> addrspace(1)* %out
ret void
}
+
+declare i32 @llvm.amdgcn.workitem.id.x() #1
+
+attributes #0 = { nounwind }
+attributes #1 = { nounwind readnone }
OpenPOWER on IntegriCloud