summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InferAddressSpaces
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2019-03-12 21:02:54 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2019-03-12 21:02:54 +0000
commitcaf1316f7100e1ba1e7e800eae6a5adf0d48bf90 (patch)
tree7b79b67ccf3ffe7fe9b56dee66444a586d7714d2 /llvm/test/Transforms/InferAddressSpaces
parent9df0754b8dbeeb597a22bb0418eb0ee04ce88b56 (diff)
downloadbcm5719-llvm-caf1316f7100e1ba1e7e800eae6a5adf0d48bf90.tar.gz
bcm5719-llvm-caf1316f7100e1ba1e7e800eae6a5adf0d48bf90.zip
IR: Add immarg attribute
This indicates an intrinsic parameter is required to be a constant, and should not be replaced with a non-constant value. Add the attribute to all AMDGPU and generic intrinsics that comments indicate it should apply to. I scanned other target intrinsics, but I don't see any obvious comments indicating which arguments are intended to be only immediates. This breaks one questionable testcase for the autoupgrade. I'm unclear on whether the autoupgrade is supposed to really handle declarations which were never valid. The verifier fails because the attributes now refer to a parameter past the end of the argument list. llvm-svn: 355981
Diffstat (limited to 'llvm/test/Transforms/InferAddressSpaces')
-rw-r--r--llvm/test/Transforms/InferAddressSpaces/AMDGPU/intrinsics.ll9
1 files changed, 0 insertions, 9 deletions
diff --git a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/intrinsics.ll b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/intrinsics.ll
index 166e90ab7b6..4694a1c5f8d 100644
--- a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/intrinsics.ll
+++ b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/intrinsics.ll
@@ -125,15 +125,6 @@ define i64 @volatile_atomicdec_group_to_flat_i64(i64 addrspace(3)* %group.ptr, i
ret i64 %ret
}
-; CHECK-LABEL: @invalid_variable_volatile_atomicinc_group_to_flat_i64(
-; CHECK-NEXT: %1 = addrspacecast i64 addrspace(3)* %group.ptr to i64*
-; CHECK-NEXT: %ret = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* %1, i64 %y, i32 0, i32 0, i1 %volatile.var)
-define i64 @invalid_variable_volatile_atomicinc_group_to_flat_i64(i64 addrspace(3)* %group.ptr, i64 %y, i1 %volatile.var) #0 {
- %cast = addrspacecast i64 addrspace(3)* %group.ptr to i64*
- %ret = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* %cast, i64 %y, i32 0, i32 0, i1 %volatile.var)
- ret i64 %ret
-}
-
declare i32 @llvm.objectsize.i32.p0i8(i8*, i1, i1, i1) #1
declare i64 @llvm.objectsize.i64.p0i8(i8*, i1, i1, i1) #1
declare i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* nocapture, i32, i32, i32, i1) #2
OpenPOWER on IntegriCloud