llvm.org GIT mirror llvm / ffe57b5
[SLP] Update propagate_ir_flags.ll test to check that we do retain the common subset, NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363218 91177308-0d34-0410-b5e6-96231b3b80d8 Dinar Temirbulatov 3 months ago
1 changed file(s) with 36 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
213213 %op1 = add nuw i32 %load1, 1
214214 %op2 = add i32 %load2, 1
215215 %op3 = add i32 %load3, 1
216 %op4 = add nuw i32 %load4, 1
217
218 store i32 %op1, i32* %idx1, align 4
219 store i32 %op2, i32* %idx2, align 4
220 store i32 %op3, i32* %idx3, align 4
221 store i32 %op4, i32* %idx4, align 4
222
223 ret void
224 }
225
226 define void @not_nsw_but_nuw(i32* %x) {
227 ; CHECK-LABEL: @not_nsw_but_nuw(
228 ; CHECK-NEXT: [[IDX1:%.*]] = getelementptr inbounds i32, i32* [[X:%.*]], i64 0
229 ; CHECK-NEXT: [[IDX2:%.*]] = getelementptr inbounds i32, i32* [[X]], i64 1
230 ; CHECK-NEXT: [[IDX3:%.*]] = getelementptr inbounds i32, i32* [[X]], i64 2
231 ; CHECK-NEXT: [[IDX4:%.*]] = getelementptr inbounds i32, i32* [[X]], i64 3
232 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast i32* [[IDX1]] to <4 x i32>*
233 ; CHECK-NEXT: [[TMP2:%.*]] = load <4 x i32>, <4 x i32>* [[TMP1]], align 4
234 ; CHECK-NEXT: [[TMP3:%.*]] = add nuw <4 x i32> [[TMP2]],
235 ; CHECK-NEXT: [[TMP4:%.*]] = bitcast i32* [[IDX1]] to <4 x i32>*
236 ; CHECK-NEXT: store <4 x i32> [[TMP3]], <4 x i32>* [[TMP4]], align 4
237 ; CHECK-NEXT: ret void
238 ;
239 %idx1 = getelementptr inbounds i32, i32* %x, i64 0
240 %idx2 = getelementptr inbounds i32, i32* %x, i64 1
241 %idx3 = getelementptr inbounds i32, i32* %x, i64 2
242 %idx4 = getelementptr inbounds i32, i32* %x, i64 3
243
244 %load1 = load i32, i32* %idx1, align 4
245 %load2 = load i32, i32* %idx2, align 4
246 %load3 = load i32, i32* %idx3, align 4
247 %load4 = load i32, i32* %idx4, align 4
248
249 %op1 = add nuw i32 %load1, 1
250 %op2 = add nuw nsw i32 %load2, 1
251 %op3 = add nuw nsw i32 %load3, 1
216252 %op4 = add nuw i32 %load4, 1
217253
218254 store i32 %op1, i32* %idx1, align 4