@@ -118,49 +118,49 @@ void attrs_on_struct() {
118
118
int force_p2d [[intel::force_pow2_depth(1 )]];
119
119
} s;
120
120
121
- // CHECK-DEVICE: %[[FIELD_NUMBANKS:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
121
+ // CHECK-DEVICE: %[[FIELD_NUMBANKS:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
122
122
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_NUMBANKS]]{{.*}}[[ANN_numbanks_4]]
123
123
s.numbanks = 0 ;
124
- // CHECK-DEVICE: %[[FIELD_REGISTER:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
124
+ // CHECK-DEVICE: %[[FIELD_REGISTER:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
125
125
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_REGISTER]]{{.*}}[[ANN_register]]
126
126
s.reg = 0 ;
127
- // CHECK-DEVICE: %[[FIELD_MEM_DEFAULT:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
127
+ // CHECK-DEVICE: %[[FIELD_MEM_DEFAULT:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
128
128
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_MEM_DEFAULT]]{{.*}}[[ANN_memory_default]]
129
129
s.memory = 0 ;
130
- // CHECK-DEVICE: %[[FIELD_MEM_BLOCKRAM:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
130
+ // CHECK-DEVICE: %[[FIELD_MEM_BLOCKRAM:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
131
131
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_MEM_BLOCKRAM]]{{.*}}[[ANN_memory_blockram]]
132
132
s.memory_blockram = 0 ;
133
- // CHECK-DEVICE: %[[FIELD_MEM_MLAB:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
133
+ // CHECK-DEVICE: %[[FIELD_MEM_MLAB:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
134
134
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_MEM_MLAB]]{{.*}}[[ANN_memory_mlab]]
135
135
s.memory_mlab = 0 ;
136
- // CHECK-DEVICE: %[[FIELD_BANKWIDTH:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
136
+ // CHECK-DEVICE: %[[FIELD_BANKWIDTH:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
137
137
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_BANKWIDTH]]{{.*}}[[ANN_bankwidth_4]]
138
138
s.bankwidth = 0 ;
139
- // CHECK-DEVICE: %[[FIELD_PRIV_COPIES:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
139
+ // CHECK-DEVICE: %[[FIELD_PRIV_COPIES:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
140
140
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_PRIV_COPIES]]{{.*}}[[ANN_private_copies_8]]
141
141
s.privatecopies = 0 ;
142
- // CHECK-DEVICE: %[[FIELD_SINGLEPUMP:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
142
+ // CHECK-DEVICE: %[[FIELD_SINGLEPUMP:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
143
143
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_SINGLEPUMP]]{{.*}}[[ANN_singlepump]]
144
144
s.singlepump = 0 ;
145
- // CHECK-DEVICE: %[[FIELD_DOUBLEPUMP:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
145
+ // CHECK-DEVICE: %[[FIELD_DOUBLEPUMP:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
146
146
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_DOUBLEPUMP]]{{.*}}[[ANN_doublepump]]
147
147
s.doublepump = 0 ;
148
- // CHECK-DEVICE: %[[FIELD_MERGE_DEPTH:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
148
+ // CHECK-DEVICE: %[[FIELD_MERGE_DEPTH:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
149
149
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_MERGE_DEPTH]]{{.*}}[[ANN_merge_depth]]
150
150
s.merge_depth = 0 ;
151
- // CHECK-DEVICE: %[[FIELD_MERGE_WIDTH:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
151
+ // CHECK-DEVICE: %[[FIELD_MERGE_WIDTH:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
152
152
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_MERGE_WIDTH]]{{.*}}[[ANN_merge_width]]
153
153
s.merge_width = 0 ;
154
- // CHECK-DEVICE: %[[FIELD_MAX_REPLICATES:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
154
+ // CHECK-DEVICE: %[[FIELD_MAX_REPLICATES:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
155
155
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_MAX_REPLICATES]]{{.*}}[[ANN_max_replicates_2]]
156
156
s.maxreplicates = 0 ;
157
- // CHECK-DEVICE: %[[FIELD_DUALPORT:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
157
+ // CHECK-DEVICE: %[[FIELD_DUALPORT:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
158
158
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_DUALPORT]]{{.*}}[[ANN_simple_dual_port]]
159
159
s.dualport = 0 ;
160
- // CHECK-DEVICE: %[[FIELD_BANKBITS:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
160
+ // CHECK-DEVICE: %[[FIELD_BANKBITS:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
161
161
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_BANKBITS]]{{.*}}[[ANN_bankbits_4_5]]
162
162
s.bankbits = 0 ;
163
- // CHECK-DEVICE: %[[FIELD_FP2D:.*]] = getelementptr inbounds %struct.attrs_on_struct{{.*}}
163
+ // CHECK-DEVICE: %[[FIELD_FP2D:.*]] = getelementptr inbounds nuw %struct.attrs_on_struct{{.*}}
164
164
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_FP2D]]{{.*}}[[ANN_force_pow2_depth_1]]
165
165
s.force_p2d = 0 ;
166
166
}
@@ -198,22 +198,22 @@ void attrs_with_template_param() {
198
198
int force_p2d [[intel::force_pow2_depth(C)]];
199
199
} s;
200
200
201
- // CHECK-DEVICE: %[[FIELD_NUMBANKS:.*]] = getelementptr inbounds %struct.templ_on_struct_fields{{.*}}
201
+ // CHECK-DEVICE: %[[FIELD_NUMBANKS:.*]] = getelementptr inbounds nuw %struct.templ_on_struct_fields{{.*}}
202
202
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_NUMBANKS]]{{.*}}[[ANN_numbanks_4]]
203
203
s.numbanks = 0 ;
204
- // CHECK-DEVICE: %[[FIELD_BANKWIDTH:.*]] = getelementptr inbounds %struct.templ_on_struct_fields{{.*}}
204
+ // CHECK-DEVICE: %[[FIELD_BANKWIDTH:.*]] = getelementptr inbounds nuw %struct.templ_on_struct_fields{{.*}}
205
205
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_BANKWIDTH]]{{.*}}[[ANN_bankwidth_4]]
206
206
s.bankwidth = 0 ;
207
- // CHECK-DEVICE: %[[FIELD_PRIV_COPIES:.*]] = getelementptr inbounds %struct.templ_on_struct_fields{{.*}}
207
+ // CHECK-DEVICE: %[[FIELD_PRIV_COPIES:.*]] = getelementptr inbounds nuw %struct.templ_on_struct_fields{{.*}}
208
208
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_PRIV_COPIES]]{{.*}}[[ANN_private_copies_4]]
209
209
s.privatecopies = 0 ;
210
- // CHECK-DEVICE: %[[FIELD_MAX_REPLICATES:.*]] = getelementptr inbounds %struct.templ_on_struct_fields{{.*}}
210
+ // CHECK-DEVICE: %[[FIELD_MAX_REPLICATES:.*]] = getelementptr inbounds nuw %struct.templ_on_struct_fields{{.*}}
211
211
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_MAX_REPLICATES]]{{.*}}[[ANN_max_replicates_4]]
212
212
s.maxreplicates = 0 ;
213
- // CHECK-DEVICE: %[[FIELD_BANKBITS:.*]] = getelementptr inbounds %struct.templ_on_struct_fields{{.*}}
213
+ // CHECK-DEVICE: %[[FIELD_BANKBITS:.*]] = getelementptr inbounds nuw %struct.templ_on_struct_fields{{.*}}
214
214
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_BANKBITS]]{{.*}}[[ANN_bankbits_4_5]]
215
215
s.bankbits = 0 ;
216
- // CHECK-DEVICE: %[[FIELD_FP2D:.*]] = getelementptr inbounds %struct.templ_on_struct_fields{{.*}}
216
+ // CHECK-DEVICE: %[[FIELD_FP2D:.*]] = getelementptr inbounds nuw %struct.templ_on_struct_fields{{.*}}
217
217
// CHECK-DEVICE: call ptr addrspace(4) @llvm.ptr.annotation.p4{{.*}}%[[FIELD_FP2D]]{{.*}}[[ANN_force_pow2_depth_1]]
218
218
s.force_p2d = 0 ;
219
219
}
@@ -231,7 +231,7 @@ void field_addrspace_cast() {
231
231
}
232
232
} state_var;
233
233
// CHECK-DEVICE: define internal {{.*}} @_ZZ20field_addrspace_castvEN5stateC2Ev
234
- // CHECK-DEVICE: %[[MEM:[a-zA-Z0-9]+]] = getelementptr inbounds %{{.*}}, ptr addrspace(4) %{{.*}}, i32 0, i32 0
234
+ // CHECK-DEVICE: %[[MEM:[a-zA-Z0-9]+]] = getelementptr inbounds nuw %{{.*}}, ptr addrspace(4) %{{.*}}, i32 0, i32 0
235
235
// CHECK-DEVICE: %[[ANN:[0-9]+]] = call ptr addrspace(4) @llvm.ptr.annotation.p4.p1(ptr addrspace(4) %[[MEM]], {{.*}}, {{.*}})
236
236
state_var.mem[0 ] = 42 ;
237
237
}
0 commit comments