1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc %s -o - -mtriple=s390x-linux-gnu -mcpu=z13 -disable-basicaa | FileCheck %s
3
4; This test checks that we do not a reference to a deleted node.
5
6%0 = type { i32 }
7
8@g_11 = external dso_local unnamed_addr global i1, align 4
9@g_69 = external dso_local global i32, align 4
10@g_73 = external dso_local unnamed_addr global i32, align 4
11@g_832 = external dso_local constant %0, align 4
12@g_938 = external dso_local unnamed_addr global i64, align 8
13
14; Function Attrs: nounwind
15define void @main() local_unnamed_addr #0 {
16; CHECK-LABEL: main:
17; CHECK:       # %bb.0:
18; CHECK-NEXT:    stmg %r12, %r15, 96(%r15)
19; CHECK-NEXT:    .cfi_offset %r12, -64
20; CHECK-NEXT:    .cfi_offset %r13, -56
21; CHECK-NEXT:    .cfi_offset %r14, -48
22; CHECK-NEXT:    .cfi_offset %r15, -40
23; CHECK-NEXT:    lhi %r0, 1
24; CHECK-NEXT:    larl %r1, g_938
25; CHECK-NEXT:    lhi %r2, 2
26; CHECK-NEXT:    lhi %r3, 3
27; CHECK-NEXT:    lhi %r4, 0
28; CHECK-NEXT:    lhi %r5, 4
29; CHECK-NEXT:    larl %r14, g_11
30; CHECK-NEXT:  .LBB0_1: # =>This Inner Loop Header: Depth=1
31; CHECK-NEXT:    strl %r0, g_73
32; CHECK-NEXT:    lrl %r13, g_832
33; CHECK-NEXT:    lrl %r13, g_832
34; CHECK-NEXT:    lrl %r13, g_832
35; CHECK-NEXT:    lrl %r13, g_832
36; CHECK-NEXT:    lrl %r13, g_832
37; CHECK-NEXT:    lrl %r13, g_832
38; CHECK-NEXT:    lrl %r13, g_832
39; CHECK-NEXT:    lrl %r13, g_832
40; CHECK-NEXT:    lrl %r13, g_832
41; CHECK-NEXT:    lrl %r13, g_832
42; CHECK-NEXT:    lrl %r13, g_832
43; CHECK-NEXT:    lrl %r13, g_832
44; CHECK-NEXT:    lrl %r13, g_832
45; CHECK-NEXT:    lrl %r13, g_832
46; CHECK-NEXT:    lrl %r13, g_832
47; CHECK-NEXT:    strl %r0, g_69
48; CHECK-NEXT:    lrl %r13, g_832
49; CHECK-DAG:     lghi %r13, 24
50; CHECK-DAG:     strl %r2, g_69
51; CHECK-DAG:     ag %r13, 0(%r1)
52; CHECK-NEXT:    lrl %r12, g_832
53; CHECK-NEXT:    strl %r3, g_69
54; CHECK-NEXT:    lrl %r12, g_832
55; CHECK-NEXT:    strl %r4, g_69
56; CHECK-NEXT:    lrl %r12, g_832
57; CHECK-NEXT:    strl %r0, g_69
58; CHECK-NEXT:    lrl %r12, g_832
59; CHECK-NEXT:    strl %r2, g_69
60; CHECK-NEXT:    lrl %r12, g_832
61; CHECK-NEXT:    strl %r3, g_69
62; CHECK-NEXT:    stgrl %r13, g_938
63; CHECK-NEXT:    lrl %r13, g_832
64; CHECK-NEXT:    strl %r5, g_69
65; CHECK-NEXT:    mvi 0(%r14), 1
66; CHECK-NEXT:    j .LBB0_1
67  br label %1
68
69; <label>:1:                                      ; preds = %1, %0
70  store i32 1, i32* @g_73, align 4
71  %2 = load i64, i64* @g_938, align 8
72  store i32 0, i32* @g_69, align 4
73  %3 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
74  %4 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
75  %5 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
76  %6 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
77  store i32 1, i32* @g_69, align 4
78  %7 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
79  %8 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
80  store i32 3, i32* @g_69, align 4
81  %9 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
82  %10 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
83  store i32 1, i32* @g_69, align 4
84  %11 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
85  store i32 2, i32* @g_69, align 4
86  %12 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
87  store i32 3, i32* @g_69, align 4
88  %13 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
89  store i32 0, i32* @g_69, align 4
90  %14 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
91  %15 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
92  %16 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
93  %17 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
94  store i32 1, i32* @g_69, align 4
95  %18 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
96  store i32 2, i32* @g_69, align 4
97  %19 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
98  store i32 3, i32* @g_69, align 4
99  %20 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
100  store i32 0, i32* @g_69, align 4
101  %21 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
102  store i32 1, i32* @g_69, align 4
103  %22 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
104  store i32 2, i32* @g_69, align 4
105  %23 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
106  store i32 3, i32* @g_69, align 4
107  %24 = add i64 %2, 24
108  store i64 %24, i64* @g_938, align 8
109  %25 = load volatile i32, i32* getelementptr inbounds (%0, %0* @g_832, i64 0, i32 0), align 4
110  store i32 4, i32* @g_69, align 4
111  store i1 true, i1* @g_11, align 4
112  br label %1
113}
114