| 1 |
; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ |
| 2 |
; RUN: -mcpu=pwr8 -mtriple=powerpcle < %s | FileCheck %s |
| 3 |
; RUN: llc -verify-machineinstrs -ppc-asm-full-reg-names -ppc-vsr-nums-as-vr \ |
| 4 |
; RUN: -mcpu=pwr8 -mtriple=powerpc < %s | FileCheck %s |
| 5 |
%struct.d = type { [131072 x i32] } |
| 6 |
|
| 7 |
@a = dso_local local_unnamed_addr global [4096 x i32] zeroinitializer, align 4 |
| 8 |
|
| 9 |
; Function Attrs: mustprogress uwtable |
| 10 |
define dso_local void @_Z1g1dILi17EE(ptr nocapture noundef readnone byval(%struct.d) align 4 %0) local_unnamed_addr #0 { |
| 11 |
; CHECK-LABEL: _Z1g1dILi17EE: |
| 12 |
; CHECK-NOT: mtfprwz f0, r4 |
| 13 |
; CHECK-NOT: stwx r3, r1, r4 |
| 14 |
; CHECK-NOT: mffprwz r4, f0 |
| 15 |
; CHECK-NOT: mtfprwz f0, r4 |
| 16 |
; CHECK-NOT: lwzx r3, r1, r4 |
| 17 |
; CHECK-NOT: mffprwz r4, f0 |
| 18 |
entry: |
| 19 |
%c = alloca %struct.d, align 4 |
| 20 |
call void @llvm.lifetime.start.p0(i64 524288, ptr nonnull %c) #3 |
| 21 |
br label %vector.body |
| 22 |
|
| 23 |
vector.body: ; preds = %vector.body.1, %entry |
| 24 |
%index = phi i32 [ 0, %entry ], [ %index.next.1, %vector.body.1 ] |
| 25 |
%vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %entry ], [ %vec.ind.next.1, %vector.body.1 ] |
| 26 |
%step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> |
| 27 |
%step.add21 = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> |
| 28 |
%step.add22 = add <4 x i32> %vec.ind, <i32 12, i32 12, i32 12, i32 12> |
| 29 |
%step.add23 = add <4 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16> |
| 30 |
%step.add24 = add <4 x i32> %vec.ind, <i32 20, i32 20, i32 20, i32 20> |
| 31 |
%step.add25 = add <4 x i32> %vec.ind, <i32 24, i32 24, i32 24, i32 24> |
| 32 |
%step.add26 = add <4 x i32> %vec.ind, <i32 28, i32 28, i32 28, i32 28> |
| 33 |
%step.add27 = add <4 x i32> %vec.ind, <i32 32, i32 32, i32 32, i32 32> |
| 34 |
%step.add28 = add <4 x i32> %vec.ind, <i32 36, i32 36, i32 36, i32 36> |
| 35 |
%step.add29 = add <4 x i32> %vec.ind, <i32 40, i32 40, i32 40, i32 40> |
| 36 |
%step.add30 = add <4 x i32> %vec.ind, <i32 44, i32 44, i32 44, i32 44> |
| 37 |
%1 = getelementptr inbounds [4096 x i32], ptr @a, i32 0, i32 %index |
| 38 |
store <4 x i32> %vec.ind, ptr %1, align 4 |
| 39 |
%2 = getelementptr inbounds i32, ptr %1, i32 4 |
| 40 |
store <4 x i32> %step.add, ptr %2, align 4 |
| 41 |
%3 = getelementptr inbounds i32, ptr %1, i32 8 |
| 42 |
store <4 x i32> %step.add21, ptr %3, align 4 |
| 43 |
%4 = getelementptr inbounds i32, ptr %1, i32 12 |
| 44 |
store <4 x i32> %step.add22, ptr %4, align 4 |
| 45 |
%5 = getelementptr inbounds i32, ptr %1, i32 16 |
| 46 |
store <4 x i32> %step.add23, ptr %5, align 4 |
| 47 |
%6 = getelementptr inbounds i32, ptr %1, i32 20 |
| 48 |
store <4 x i32> %step.add24, ptr %6, align 4 |
| 49 |
%7 = getelementptr inbounds i32, ptr %1, i32 24 |
| 50 |
store <4 x i32> %step.add25, ptr %7, align 4 |
| 51 |
%8 = getelementptr inbounds i32, ptr %1, i32 28 |
| 52 |
store <4 x i32> %step.add26, ptr %8, align 4 |
| 53 |
%9 = getelementptr inbounds i32, ptr %1, i32 32 |
| 54 |
store <4 x i32> %step.add27, ptr %9, align 4 |
| 55 |
%10 = getelementptr inbounds i32, ptr %1, i32 36 |
| 56 |
store <4 x i32> %step.add28, ptr %10, align 4 |
| 57 |
%11 = getelementptr inbounds i32, ptr %1, i32 40 |
| 58 |
store <4 x i32> %step.add29, ptr %11, align 4 |
| 59 |
%12 = getelementptr inbounds i32, ptr %1, i32 44 |
| 60 |
store <4 x i32> %step.add30, ptr %12, align 4 |
| 61 |
%index.next = add nuw nsw i32 %index, 48 |
| 62 |
%13 = icmp eq i32 %index.next, 4080 |
| 63 |
br i1 %13, label %for.body, label %vector.body.1 |
| 64 |
|
| 65 |
vector.body.1: ; preds = %vector.body |
| 66 |
%vec.ind.next = add <4 x i32> %vec.ind, <i32 48, i32 48, i32 48, i32 48> |
| 67 |
%step.add.1 = add <4 x i32> %vec.ind, <i32 52, i32 52, i32 52, i32 52> |
| 68 |
%step.add21.1 = add <4 x i32> %vec.ind, <i32 56, i32 56, i32 56, i32 56> |
| 69 |
%step.add22.1 = add <4 x i32> %vec.ind, <i32 60, i32 60, i32 60, i32 60> |
| 70 |
%step.add23.1 = add <4 x i32> %vec.ind, <i32 64, i32 64, i32 64, i32 64> |
| 71 |
%step.add24.1 = add <4 x i32> %vec.ind, <i32 68, i32 68, i32 68, i32 68> |
| 72 |
%step.add25.1 = add <4 x i32> %vec.ind, <i32 72, i32 72, i32 72, i32 72> |
| 73 |
%step.add26.1 = add <4 x i32> %vec.ind, <i32 76, i32 76, i32 76, i32 76> |
| 74 |
%step.add27.1 = add <4 x i32> %vec.ind, <i32 80, i32 80, i32 80, i32 80> |
| 75 |
%step.add28.1 = add <4 x i32> %vec.ind, <i32 84, i32 84, i32 84, i32 84> |
| 76 |
%step.add29.1 = add <4 x i32> %vec.ind, <i32 88, i32 88, i32 88, i32 88> |
| 77 |
%step.add30.1 = add <4 x i32> %vec.ind, <i32 92, i32 92, i32 92, i32 92> |
| 78 |
%14 = getelementptr inbounds [4096 x i32], ptr @a, i32 0, i32 %index.next |
| 79 |
store <4 x i32> %vec.ind.next, ptr %14, align 4 |
| 80 |
%15 = getelementptr inbounds i32, ptr %14, i32 4 |
| 81 |
store <4 x i32> %step.add.1, ptr %15, align 4 |
| 82 |
%16 = getelementptr inbounds i32, ptr %14, i32 8 |
| 83 |
store <4 x i32> %step.add21.1, ptr %16, align 4 |
| 84 |
%17 = getelementptr inbounds i32, ptr %14, i32 12 |
| 85 |
store <4 x i32> %step.add22.1, ptr %17, align 4 |
| 86 |
%18 = getelementptr inbounds i32, ptr %14, i32 16 |
| 87 |
store <4 x i32> %step.add23.1, ptr %18, align 4 |
| 88 |
%19 = getelementptr inbounds i32, ptr %14, i32 20 |
| 89 |
store <4 x i32> %step.add24.1, ptr %19, align 4 |
| 90 |
%20 = getelementptr inbounds i32, ptr %14, i32 24 |
| 91 |
store <4 x i32> %step.add25.1, ptr %20, align 4 |
| 92 |
%21 = getelementptr inbounds i32, ptr %14, i32 28 |
| 93 |
store <4 x i32> %step.add26.1, ptr %21, align 4 |
| 94 |
%22 = getelementptr inbounds i32, ptr %14, i32 32 |
| 95 |
store <4 x i32> %step.add27.1, ptr %22, align 4 |
| 96 |
%23 = getelementptr inbounds i32, ptr %14, i32 36 |
| 97 |
store <4 x i32> %step.add28.1, ptr %23, align 4 |
| 98 |
%24 = getelementptr inbounds i32, ptr %14, i32 40 |
| 99 |
store <4 x i32> %step.add29.1, ptr %24, align 4 |
| 100 |
%25 = getelementptr inbounds i32, ptr %14, i32 44 |
| 101 |
store <4 x i32> %step.add30.1, ptr %25, align 4 |
| 102 |
%index.next.1 = add nuw nsw i32 %index, 96 |
| 103 |
%vec.ind.next.1 = add <4 x i32> %vec.ind, <i32 96, i32 96, i32 96, i32 96> |
| 104 |
br label %vector.body |
| 105 |
|
| 106 |
vector.body37: ; preds = %vector.body37.1, %for.body |
| 107 |
%index38 = phi i32 [ 0, %for.body ], [ %index.next53.1, %vector.body37.1 ] |
| 108 |
%vec.ind39 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %for.body ], [ %vec.ind.next52.1, %vector.body37.1 ] |
| 109 |
%step.add40 = add <4 x i32> %vec.ind39, <i32 4, i32 4, i32 4, i32 4> |
| 110 |
%step.add41 = add <4 x i32> %vec.ind39, <i32 8, i32 8, i32 8, i32 8> |
| 111 |
%step.add42 = add <4 x i32> %vec.ind39, <i32 12, i32 12, i32 12, i32 12> |
| 112 |
%step.add43 = add <4 x i32> %vec.ind39, <i32 16, i32 16, i32 16, i32 16> |
| 113 |
%step.add44 = add <4 x i32> %vec.ind39, <i32 20, i32 20, i32 20, i32 20> |
| 114 |
%step.add45 = add <4 x i32> %vec.ind39, <i32 24, i32 24, i32 24, i32 24> |
| 115 |
%step.add46 = add <4 x i32> %vec.ind39, <i32 28, i32 28, i32 28, i32 28> |
| 116 |
%step.add47 = add <4 x i32> %vec.ind39, <i32 32, i32 32, i32 32, i32 32> |
| 117 |
%step.add48 = add <4 x i32> %vec.ind39, <i32 36, i32 36, i32 36, i32 36> |
| 118 |
%step.add49 = add <4 x i32> %vec.ind39, <i32 40, i32 40, i32 40, i32 40> |
| 119 |
%step.add50 = add <4 x i32> %vec.ind39, <i32 44, i32 44, i32 44, i32 44> |
| 120 |
%26 = getelementptr inbounds [4096 x i32], ptr @a, i32 0, i32 %index38 |
| 121 |
store <4 x i32> %vec.ind39, ptr %26, align 4 |
| 122 |
%27 = getelementptr inbounds i32, ptr %26, i32 4 |
| 123 |
store <4 x i32> %step.add40, ptr %27, align 4 |
| 124 |
%28 = getelementptr inbounds i32, ptr %26, i32 8 |
| 125 |
store <4 x i32> %step.add41, ptr %28, align 4 |
| 126 |
%29 = getelementptr inbounds i32, ptr %26, i32 12 |
| 127 |
store <4 x i32> %step.add42, ptr %29, align 4 |
| 128 |
%30 = getelementptr inbounds i32, ptr %26, i32 16 |
| 129 |
store <4 x i32> %step.add43, ptr %30, align 4 |
| 130 |
%31 = getelementptr inbounds i32, ptr %26, i32 20 |
| 131 |
store <4 x i32> %step.add44, ptr %31, align 4 |
| 132 |
%32 = getelementptr inbounds i32, ptr %26, i32 24 |
| 133 |
store <4 x i32> %step.add45, ptr %32, align 4 |
| 134 |
%33 = getelementptr inbounds i32, ptr %26, i32 28 |
| 135 |
store <4 x i32> %step.add46, ptr %33, align 4 |
| 136 |
%34 = getelementptr inbounds i32, ptr %26, i32 32 |
| 137 |
store <4 x i32> %step.add47, ptr %34, align 4 |
| 138 |
%35 = getelementptr inbounds i32, ptr %26, i32 36 |
| 139 |
store <4 x i32> %step.add48, ptr %35, align 4 |
| 140 |
%36 = getelementptr inbounds i32, ptr %26, i32 40 |
| 141 |
store <4 x i32> %step.add49, ptr %36, align 4 |
| 142 |
%37 = getelementptr inbounds i32, ptr %26, i32 44 |
| 143 |
store <4 x i32> %step.add50, ptr %37, align 4 |
| 144 |
%index.next53 = add nuw nsw i32 %index38, 48 |
| 145 |
%38 = icmp eq i32 %index.next53, 4080 |
| 146 |
br i1 %38, label %for.body5, label %vector.body37.1 |
| 147 |
|
| 148 |
vector.body37.1: ; preds = %vector.body37 |
| 149 |
%vec.ind.next52 = add <4 x i32> %vec.ind39, <i32 48, i32 48, i32 48, i32 48> |
| 150 |
%step.add40.1 = add <4 x i32> %vec.ind39, <i32 52, i32 52, i32 52, i32 52> |
| 151 |
%step.add41.1 = add <4 x i32> %vec.ind39, <i32 56, i32 56, i32 56, i32 56> |
| 152 |
%step.add42.1 = add <4 x i32> %vec.ind39, <i32 60, i32 60, i32 60, i32 60> |
| 153 |
%step.add43.1 = add <4 x i32> %vec.ind39, <i32 64, i32 64, i32 64, i32 64> |
| 154 |
%step.add44.1 = add <4 x i32> %vec.ind39, <i32 68, i32 68, i32 68, i32 68> |
| 155 |
%step.add45.1 = add <4 x i32> %vec.ind39, <i32 72, i32 72, i32 72, i32 72> |
| 156 |
%step.add46.1 = add <4 x i32> %vec.ind39, <i32 76, i32 76, i32 76, i32 76> |
| 157 |
%step.add47.1 = add <4 x i32> %vec.ind39, <i32 80, i32 80, i32 80, i32 80> |
| 158 |
%step.add48.1 = add <4 x i32> %vec.ind39, <i32 84, i32 84, i32 84, i32 84> |
| 159 |
%step.add49.1 = add <4 x i32> %vec.ind39, <i32 88, i32 88, i32 88, i32 88> |
| 160 |
%step.add50.1 = add <4 x i32> %vec.ind39, <i32 92, i32 92, i32 92, i32 92> |
| 161 |
%39 = getelementptr inbounds [4096 x i32], ptr @a, i32 0, i32 %index.next53 |
| 162 |
store <4 x i32> %vec.ind.next52, ptr %39, align 4 |
| 163 |
%40 = getelementptr inbounds i32, ptr %39, i32 4 |
| 164 |
store <4 x i32> %step.add40.1, ptr %40, align 4 |
| 165 |
%41 = getelementptr inbounds i32, ptr %39, i32 8 |
| 166 |
store <4 x i32> %step.add41.1, ptr %41, align 4 |
| 167 |
%42 = getelementptr inbounds i32, ptr %39, i32 12 |
| 168 |
store <4 x i32> %step.add42.1, ptr %42, align 4 |
| 169 |
%43 = getelementptr inbounds i32, ptr %39, i32 16 |
| 170 |
store <4 x i32> %step.add43.1, ptr %43, align 4 |
| 171 |
%44 = getelementptr inbounds i32, ptr %39, i32 20 |
| 172 |
store <4 x i32> %step.add44.1, ptr %44, align 4 |
| 173 |
%45 = getelementptr inbounds i32, ptr %39, i32 24 |
| 174 |
store <4 x i32> %step.add45.1, ptr %45, align 4 |
| 175 |
%46 = getelementptr inbounds i32, ptr %39, i32 28 |
| 176 |
store <4 x i32> %step.add46.1, ptr %46, align 4 |
| 177 |
%47 = getelementptr inbounds i32, ptr %39, i32 32 |
| 178 |
store <4 x i32> %step.add47.1, ptr %47, align 4 |
| 179 |
%48 = getelementptr inbounds i32, ptr %39, i32 36 |
| 180 |
store <4 x i32> %step.add48.1, ptr %48, align 4 |
| 181 |
%49 = getelementptr inbounds i32, ptr %39, i32 40 |
| 182 |
store <4 x i32> %step.add49.1, ptr %49, align 4 |
| 183 |
%50 = getelementptr inbounds i32, ptr %39, i32 44 |
| 184 |
store <4 x i32> %step.add50.1, ptr %50, align 4 |
| 185 |
%index.next53.1 = add nuw nsw i32 %index38, 96 |
| 186 |
%vec.ind.next52.1 = add <4 x i32> %vec.ind39, <i32 96, i32 96, i32 96, i32 96> |
| 187 |
br label %vector.body37 |
| 188 |
|
| 189 |
for.body: ; preds = %vector.body |
| 190 |
store i32 4080, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4080), align 4 |
| 191 |
store i32 4081, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4081), align 4 |
| 192 |
store i32 4082, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4082), align 4 |
| 193 |
store i32 4083, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4083), align 4 |
| 194 |
store i32 4084, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4084), align 4 |
| 195 |
store i32 4085, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4085), align 4 |
| 196 |
store i32 4086, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4086), align 4 |
| 197 |
store i32 4087, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4087), align 4 |
| 198 |
store i32 4088, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4088), align 4 |
| 199 |
store i32 4089, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4089), align 4 |
| 200 |
store i32 4090, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4090), align 4 |
| 201 |
store i32 4091, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4091), align 4 |
| 202 |
store i32 4092, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4092), align 4 |
| 203 |
store i32 4093, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4093), align 4 |
| 204 |
store i32 4094, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4094), align 4 |
| 205 |
store i32 4095, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4095), align 4 |
| 206 |
call void @_ZN1dILi17EE1eEv(ptr noundef nonnull align 4 dereferenceable(524288) %c) |
| 207 |
br label %vector.body37 |
| 208 |
|
| 209 |
for.body5: ; preds = %vector.body37 |
| 210 |
store i32 4080, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4080), align 4 |
| 211 |
store i32 4081, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4081), align 4 |
| 212 |
store i32 4082, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4082), align 4 |
| 213 |
store i32 4083, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4083), align 4 |
| 214 |
store i32 4084, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4084), align 4 |
| 215 |
store i32 4085, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4085), align 4 |
| 216 |
store i32 4086, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4086), align 4 |
| 217 |
store i32 4087, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4087), align 4 |
| 218 |
store i32 4088, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4088), align 4 |
| 219 |
store i32 4089, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4089), align 4 |
| 220 |
store i32 4090, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4090), align 4 |
| 221 |
store i32 4091, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4091), align 4 |
| 222 |
store i32 4092, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4092), align 4 |
| 223 |
store i32 4093, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4093), align 4 |
| 224 |
store i32 4094, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4094), align 4 |
| 225 |
store i32 4095, ptr getelementptr inbounds ([4096 x i32], ptr @a, i32 0, i32 4095), align 4 |
| 226 |
call void @_Z1h1dILi17EE(ptr noundef nonnull byval(%struct.d) align 4 %c) |
| 227 |
call void @llvm.lifetime.end.p0(i64 524288, ptr nonnull %c) #3 |
| 228 |
ret void |
| 229 |
} |
| 230 |
|
| 231 |
; Function Attrs: argmemonly mustprogress nocallback nofree nosync nounwind willreturn |
| 232 |
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 |
| 233 |
|
| 234 |
; Function Attrs: argmemonly mustprogress nocallback nofree nosync nounwind willreturn |
| 235 |
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 |
| 236 |
|
| 237 |
declare dso_local void @_ZN1dILi17EE1eEv(ptr noundef nonnull align 4 dereferenceable(524288)) local_unnamed_addr #2 |
| 238 |
|
| 239 |
declare dso_local void @_Z1h1dILi17EE(ptr noundef byval(%struct.d) align 4) local_unnamed_addr #2 |
| 240 |
|
| 241 |
attributes #0 = { nounwind } |