5
5
; turn out to be stores to constant memory, and will therefore be
6
6
; deleted as UB.
7
7
8
- define void @test_constant_addrspace (i8 addrspace (4 )* %p ) {
8
+ define void @test_constant_addrspace (ptr addrspace (4 ) %p ) {
9
9
; CHECK-LABEL: @test_constant_addrspace(
10
10
; CHECK-NEXT: ret void
11
11
;
12
- store i8 0 , i8 addrspace (4 )* %p
12
+ store i8 0 , ptr addrspace (4 ) %p
13
13
ret void
14
14
}
15
15
16
- define void @test_constant32bit_addrspace (i8 addrspace (6 )* %p ) {
16
+ define void @test_constant32bit_addrspace (ptr addrspace (6 ) %p ) {
17
17
; CHECK-LABEL: @test_constant32bit_addrspace(
18
18
; CHECK-NEXT: ret void
19
19
;
20
- store i8 0 , i8 addrspace (6 )* %p
20
+ store i8 0 , ptr addrspace (6 ) %p
21
21
ret void
22
22
}
23
23
24
- define void @test_cast_generic_from_constant_addrspace (i8 addrspace (4 )* %p ) {
24
+ define void @test_cast_generic_from_constant_addrspace (ptr addrspace (4 ) %p ) {
25
25
; CHECK-LABEL: @test_cast_generic_from_constant_addrspace(
26
26
; CHECK-NEXT: ret void
27
27
;
28
- %cast = addrspacecast i8 addrspace (4 )* %p to i8*
29
- store i8 0 , i8* %cast
28
+ %cast = addrspacecast ptr addrspace (4 ) %p to ptr
29
+ store i8 0 , ptr %cast
30
30
ret void
31
31
}
32
32
33
- define void @test_cast_generic_from_constant32bit_addrspace (i8 addrspace (6 )* %p ) {
33
+ define void @test_cast_generic_from_constant32bit_addrspace (ptr addrspace (6 ) %p ) {
34
34
; CHECK-LABEL: @test_cast_generic_from_constant32bit_addrspace(
35
35
; CHECK-NEXT: ret void
36
36
;
37
- %cast = addrspacecast i8 addrspace (6 )* %p to i8*
38
- store i8 0 , i8* %cast
37
+ %cast = addrspacecast ptr addrspace (6 ) %p to ptr
38
+ store i8 0 , ptr %cast
39
39
ret void
40
40
}
41
41
42
- define void @test_cast_generic_to_constant_addrspace (i8* %p ) {
42
+ define void @test_cast_generic_to_constant_addrspace (ptr %p ) {
43
43
; CHECK-LABEL: @test_cast_generic_to_constant_addrspace(
44
44
; CHECK-NEXT: ret void
45
45
;
46
- %cast = addrspacecast i8* %p to i8 addrspace (4 )*
47
- store i8 0 , i8 addrspace (4 )* %cast
46
+ %cast = addrspacecast ptr %p to ptr addrspace (4 )
47
+ store i8 0 , ptr addrspace (4 ) %cast
48
48
ret void
49
49
}
50
50
51
- define void @test_cast_generic_to_constant32bit_addrspace (i8* %p ) {
51
+ define void @test_cast_generic_to_constant32bit_addrspace (ptr %p ) {
52
52
; CHECK-LABEL: @test_cast_generic_to_constant32bit_addrspace(
53
53
; CHECK-NEXT: ret void
54
54
;
55
- %cast = addrspacecast i8* %p to i8 addrspace (6 )*
56
- store i8 0 , i8 addrspace (6 )* %cast
55
+ %cast = addrspacecast ptr %p to ptr addrspace (6 )
56
+ store i8 0 , ptr addrspace (6 ) %cast
57
57
ret void
58
58
}
59
59
60
- define amdgpu_kernel void @noalias_readnone_global_kernarg (i32 addrspace (1 )* noalias readnone %arg ) {
60
+ define amdgpu_kernel void @noalias_readnone_global_kernarg (ptr addrspace (1 ) noalias readnone %arg ) {
61
61
; CHECK-LABEL: @noalias_readnone_global_kernarg(
62
62
; CHECK-NEXT: ret void
63
63
;
64
- store i32 0 , i32 addrspace (1 )* %arg
64
+ store i32 0 , ptr addrspace (1 ) %arg
65
65
ret void
66
66
}
67
67
68
- define amdgpu_kernel void @noalias_readonly_global_kernarg (i32 addrspace (1 )* noalias readonly %arg ) {
68
+ define amdgpu_kernel void @noalias_readonly_global_kernarg (ptr addrspace (1 ) noalias readonly %arg ) {
69
69
; CHECK-LABEL: @noalias_readonly_global_kernarg(
70
70
; CHECK-NEXT: ret void
71
71
;
72
- store i32 0 , i32 addrspace (1 )* %arg
72
+ store i32 0 , ptr addrspace (1 ) %arg
73
73
ret void
74
74
}
75
75
76
- define amdgpu_kernel void @readnone_global_kernarg (i32 addrspace (1 )* readnone %arg ) {
76
+ define amdgpu_kernel void @readnone_global_kernarg (ptr addrspace (1 ) readnone %arg ) {
77
77
; CHECK-LABEL: @readnone_global_kernarg(
78
- ; CHECK-NEXT: store i32 0, i32 addrspace(1)* [[ARG:%.*]], align 4
78
+ ; CHECK-NEXT: store i32 0, ptr addrspace(1) [[ARG:%.*]], align 4
79
79
; CHECK-NEXT: ret void
80
80
;
81
- store i32 0 , i32 addrspace (1 )* %arg
81
+ store i32 0 , ptr addrspace (1 ) %arg
82
82
ret void
83
83
}
84
84
85
- define amdgpu_kernel void @readonly_global_kernarg (i32 addrspace (1 )* readonly %arg ) {
85
+ define amdgpu_kernel void @readonly_global_kernarg (ptr addrspace (1 ) readonly %arg ) {
86
86
; CHECK-LABEL: @readonly_global_kernarg(
87
- ; CHECK-NEXT: store i32 0, i32 addrspace(1)* [[ARG:%.*]], align 4
87
+ ; CHECK-NEXT: store i32 0, ptr addrspace(1) [[ARG:%.*]], align 4
88
88
; CHECK-NEXT: ret void
89
89
;
90
- store i32 0 , i32 addrspace (1 )* %arg
90
+ store i32 0 , ptr addrspace (1 ) %arg
91
91
ret void
92
92
}
93
93
@@ -97,7 +97,7 @@ define amdgpu_kernel void @constant_gv_global_as() {
97
97
; CHECK-LABEL: @constant_gv_global_as(
98
98
; CHECK-NEXT: ret void
99
99
;
100
- store i32 0 , i32 addrspace (1 )* @global_as_constant
100
+ store i32 0 , ptr addrspace (1 ) @global_as_constant
101
101
ret void
102
102
}
103
103
@@ -107,6 +107,6 @@ define amdgpu_kernel void @nonconst_gv_constant_as() {
107
107
; CHECK-LABEL: @nonconst_gv_constant_as(
108
108
; CHECK-NEXT: ret void
109
109
;
110
- store i32 0 , i32 addrspace (4 )* @global_nonconstant_constant_as
110
+ store i32 0 , ptr addrspace (4 ) @global_nonconstant_constant_as
111
111
ret void
112
112
}
0 commit comments