1 ; RUN: llc -march=mipsel -mcpu=mips32r2 < %s | FileCheck %s
3 %struct.S = type <{ [4 x float] }>
5 @s = external global [4 x %struct.S]
6 @gf = external global float
7 @gd = external global double
9 define float @foo0(float* nocapture %b, i32 %o) nounwind readonly {
12 %arrayidx = getelementptr inbounds float* %b, i32 %o
13 %0 = load float* %arrayidx, align 4
17 define double @foo1(double* nocapture %b, i32 %o) nounwind readonly {
20 %arrayidx = getelementptr inbounds double* %b, i32 %o
21 %0 = load double* %arrayidx, align 8
25 define float @foo2(i32 %b, i32 %c) nounwind readonly {
28 %arrayidx1 = getelementptr inbounds [4 x %struct.S]* @s, i32 0, i32 %b, i32 0, i32 %c
29 %0 = load float* %arrayidx1, align 1
33 define void @foo3(float* nocapture %b, i32 %o) nounwind {
36 %0 = load float* @gf, align 4
37 %arrayidx = getelementptr inbounds float* %b, i32 %o
38 store float %0, float* %arrayidx, align 4
42 define void @foo4(double* nocapture %b, i32 %o) nounwind {
45 %0 = load double* @gd, align 8
46 %arrayidx = getelementptr inbounds double* %b, i32 %o
47 store double %0, double* %arrayidx, align 8
51 define void @foo5(i32 %b, i32 %c) nounwind {
54 %0 = load float* @gf, align 4
55 %arrayidx1 = getelementptr inbounds [4 x %struct.S]* @s, i32 0, i32 %b, i32 0, i32 %c
56 store float %0, float* %arrayidx1, align 1