summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AMDGPU/promote-alloca-volatile.ll
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2016-05-18 23:20:24 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2016-05-18 23:20:24 +0000
commitc438ef574df3fd4ecd1ce8d534bcff95a29756bb (patch)
treefd41a64d682704fa0b040440364ea14eb37cbe86 /llvm/test/CodeGen/AMDGPU/promote-alloca-volatile.ll
parent52bbde2bbce0dedee49429b30018f81e024c2db2 (diff)
downloadbcm5719-llvm-c438ef574df3fd4ecd1ce8d534bcff95a29756bb.tar.gz
bcm5719-llvm-c438ef574df3fd4ecd1ce8d534bcff95a29756bb.zip
AMDGPU: Fix promote alloca for pointer loads
If the load has a pointer type, we don't want to change its type. llvm-svn: 270000
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/promote-alloca-volatile.ll')
-rw-r--r--llvm/test/CodeGen/AMDGPU/promote-alloca-volatile.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/promote-alloca-volatile.ll b/llvm/test/CodeGen/AMDGPU/promote-alloca-volatile.ll
index 313cdf59301..f9de38839bc 100644
--- a/llvm/test/CodeGen/AMDGPU/promote-alloca-volatile.ll
+++ b/llvm/test/CodeGen/AMDGPU/promote-alloca-volatile.ll
@@ -24,3 +24,22 @@ entry:
store volatile i32 %tmp, i32* %arrayidx1
ret void
}
+
+; Has on OK non-volatile user but also a volatile user
+; CHECK-LABEL: @volatile_and_non_volatile_load(
+; CHECK: alloca double
+; CHECK: load double
+; CHECK: load volatile double
+define void @volatile_and_non_volatile_load(double addrspace(1)* nocapture %arg, i32 %arg1) #0 {
+bb:
+ %tmp = alloca double, align 8
+ store double 0.000000e+00, double* %tmp, align 8
+
+ %tmp4 = load double, double* %tmp, align 8
+ %tmp5 = load volatile double, double* %tmp, align 8
+
+ store double %tmp4, double addrspace(1)* %arg
+ ret void
+}
+
+attributes #0 = { nounwind }
OpenPOWER on IntegriCloud