summaryrefslogtreecommitdiff
path: root/test/CodeGen/Mips
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-02-27 19:29:02 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-02-27 19:29:02 +0000
commit198d8baafbfdfcf5a5e219602a5d94ed263973b4 (patch)
tree1c76a588765bdfffb32fbce3c05cf18009be4f64 /test/CodeGen/Mips
parent56f3b7f2fd1505ecf94bed8cae92375cdcde4efe (diff)
[opaque pointer type] Add textual IR support for explicit type parameter to getelementptr instruction
One of several parallel first steps to remove the target type of pointers, replacing them with a single opaque pointer type. This adds an explicit type parameter to the gep instruction so that when the first parameter becomes an opaque pointer type, the type to gep through is still available to the instructions. * This doesn't modify gep operators, only instructions (operators will be handled separately) * Textual IR changes only. Bitcode (including upgrade) and changing the in-memory representation will be in separate changes. * geps of vectors are transformed as: getelementptr <4 x float*> %x, ... ->getelementptr float, <4 x float*> %x, ... Then, once the opaque pointer type is introduced, this will ultimately look like: getelementptr float, <4 x ptr> %x with the unambiguous interpretation that it is a vector of pointers to float. * address spaces remain on the pointer, not the type: getelementptr float addrspace(1)* %x ->getelementptr float, float addrspace(1)* %x Then, eventually: getelementptr float, ptr addrspace(1) %x Importantly, the massive amount of test case churn has been automated by same crappy python code. I had to manually update a few test cases that wouldn't fit the script's model (r228970,r229196,r229197,r229198). The python script just massages stdin and writes the result to stdout, I then wrapped that in a shell script to handle replacing files, then using the usual find+xargs to migrate all the files. update.py: import fileinput import sys import re ibrep = re.compile(r"(^.*?[^%\w]getelementptr inbounds )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") normrep = re.compile( r"(^.*?[^%\w]getelementptr )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") def conv(match, line): if not match: return line line = match.groups()[0] if len(match.groups()[5]) == 0: line += match.groups()[2] line += match.groups()[3] line += ", " line += match.groups()[1] line += "\n" return line for line in sys.stdin: if line.find("getelementptr ") == line.find("getelementptr inbounds"): if line.find("getelementptr inbounds") != line.find("getelementptr inbounds ("): line = conv(re.match(ibrep, line), line) elif line.find("getelementptr ") != line.find("getelementptr ("): line = conv(re.match(normrep, line), line) sys.stdout.write(line) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh After that, check-all (with llvm, clang, clang-tools-extra, lld, compiler-rt, and polly all checked out). The extra 'rm' in the apply.sh script is due to a few files in clang's test suite using interesting unicode stuff that my python script was throwing exceptions on. None of those files needed to be migrated, so it seemed sufficient to ignore those cases. Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7636 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/Mips')
-rw-r--r--test/CodeGen/Mips/2008-07-03-SRet.ll6
-rw-r--r--test/CodeGen/Mips/2008-10-13-LegalizerBug.ll2
-rw-r--r--test/CodeGen/Mips/2008-11-10-xint_to_fp.ll8
-rw-r--r--test/CodeGen/Mips/Fast-ISel/overflt.ll4
-rw-r--r--test/CodeGen/Mips/addressing-mode.ll4
-rw-r--r--test/CodeGen/Mips/align16.ll4
-rw-r--r--test/CodeGen/Mips/alloca.ll18
-rw-r--r--test/CodeGen/Mips/alloca16.ll14
-rw-r--r--test/CodeGen/Mips/brdelayslot.ll2
-rw-r--r--test/CodeGen/Mips/brind.ll2
-rw-r--r--test/CodeGen/Mips/cconv/arguments-float.ll46
-rw-r--r--test/CodeGen/Mips/cconv/arguments-fp128.ll10
-rw-r--r--test/CodeGen/Mips/cconv/arguments-hard-float-varargs.ll8
-rw-r--r--test/CodeGen/Mips/cconv/arguments-hard-float.ll44
-rw-r--r--test/CodeGen/Mips/cconv/arguments-hard-fp128.ll10
-rw-r--r--test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll20
-rw-r--r--test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll10
-rw-r--r--test/CodeGen/Mips/cconv/arguments-varargs-small-structs-multiple-args.ll18
-rw-r--r--test/CodeGen/Mips/cconv/arguments-varargs.ll36
-rw-r--r--test/CodeGen/Mips/cconv/arguments.ll38
-rw-r--r--test/CodeGen/Mips/cmplarge.ll2
-rw-r--r--test/CodeGen/Mips/dsp-patterns.ll6
-rw-r--r--test/CodeGen/Mips/fp-indexed-ls.ll16
-rw-r--r--test/CodeGen/Mips/fp-spill-reload.ll14
-rw-r--r--test/CodeGen/Mips/hfptrcall.ll8
-rw-r--r--test/CodeGen/Mips/largeimm1.ll2
-rw-r--r--test/CodeGen/Mips/largeimmprinting.ll2
-rw-r--r--test/CodeGen/Mips/memcpy.ll4
-rw-r--r--test/CodeGen/Mips/micromips-delay-slot-jr.ll4
-rw-r--r--test/CodeGen/Mips/micromips-sw-lw-16.ll4
-rw-r--r--test/CodeGen/Mips/mips16_fpret.ll8
-rw-r--r--test/CodeGen/Mips/misha.ll4
-rw-r--r--test/CodeGen/Mips/mno-ldc1-sdc1.ll4
-rw-r--r--test/CodeGen/Mips/msa/frameindex.ll12
-rw-r--r--test/CodeGen/Mips/msa/spill.ll264
-rw-r--r--test/CodeGen/Mips/nacl-align.ll2
-rw-r--r--test/CodeGen/Mips/o32_cc_byval.ll24
-rw-r--r--test/CodeGen/Mips/prevent-hoisting.ll18
-rw-r--r--test/CodeGen/Mips/sr1.ll8
-rw-r--r--test/CodeGen/Mips/stackcoloring.ll4
-rw-r--r--test/CodeGen/Mips/swzero.ll2
41 files changed, 358 insertions, 358 deletions
diff --git a/test/CodeGen/Mips/2008-07-03-SRet.ll b/test/CodeGen/Mips/2008-07-03-SRet.ll
index afec7f65d60..6313ec4af35 100644
--- a/test/CodeGen/Mips/2008-07-03-SRet.ll
+++ b/test/CodeGen/Mips/2008-07-03-SRet.ll
@@ -7,11 +7,11 @@ entry:
; CHECK: sw ${{[0-9]+}}, {{[0-9]+}}($4)
; CHECK: sw ${{[0-9]+}}, {{[0-9]+}}($4)
; CHECK: sw ${{[0-9]+}}, {{[0-9]+}}($4)
- getelementptr %struct.sret0* %agg.result, i32 0, i32 0 ; <i32*>:0 [#uses=1]
+ getelementptr %struct.sret0, %struct.sret0* %agg.result, i32 0, i32 0 ; <i32*>:0 [#uses=1]
store i32 %dummy, i32* %0, align 4
- getelementptr %struct.sret0* %agg.result, i32 0, i32 1 ; <i32*>:1 [#uses=1]
+ getelementptr %struct.sret0, %struct.sret0* %agg.result, i32 0, i32 1 ; <i32*>:1 [#uses=1]
store i32 %dummy, i32* %1, align 4
- getelementptr %struct.sret0* %agg.result, i32 0, i32 2 ; <i32*>:2 [#uses=1]
+ getelementptr %struct.sret0, %struct.sret0* %agg.result, i32 0, i32 2 ; <i32*>:2 [#uses=1]
store i32 %dummy, i32* %2, align 4
ret void
}
diff --git a/test/CodeGen/Mips/2008-10-13-LegalizerBug.ll b/test/CodeGen/Mips/2008-10-13-LegalizerBug.ll
index 18f5b3d7ff7..6e447477289 100644
--- a/test/CodeGen/Mips/2008-10-13-LegalizerBug.ll
+++ b/test/CodeGen/Mips/2008-10-13-LegalizerBug.ll
@@ -7,7 +7,7 @@ entry:
continue.outer: ; preds = %case4, %entry
%p.0.ph.rec = phi i32 [ 0, %entry ], [ %indvar.next, %case4 ] ; <i32> [#uses=2]
- %p.0.ph = getelementptr i8* %0, i32 %p.0.ph.rec ; <i8*> [#uses=1]
+ %p.0.ph = getelementptr i8, i8* %0, i32 %p.0.ph.rec ; <i8*> [#uses=1]
%1 = load i8* %p.0.ph ; <i8> [#uses=1]
switch i8 %1, label %infloop [
i8 0, label %return.split
diff --git a/test/CodeGen/Mips/2008-11-10-xint_to_fp.ll b/test/CodeGen/Mips/2008-11-10-xint_to_fp.ll
index 9c4838a87e5..32584e43c74 100644
--- a/test/CodeGen/Mips/2008-11-10-xint_to_fp.ll
+++ b/test/CodeGen/Mips/2008-11-10-xint_to_fp.ll
@@ -16,12 +16,12 @@ entry:
load i16* %xseed, align 2 ; <i16>:0 [#uses=1]
uitofp i16 %0 to double ; <double>:1 [#uses=1]
tail call double @ldexp( double %1, i32 -48 ) nounwind ; <double>:2 [#uses=1]
- getelementptr i16* %xseed, i32 1 ; <i16*>:3 [#uses=1]
+ getelementptr i16, i16* %xseed, i32 1 ; <i16*>:3 [#uses=1]
load i16* %3, align 2 ; <i16>:4 [#uses=1]
uitofp i16 %4 to double ; <double>:5 [#uses=1]
tail call double @ldexp( double %5, i32 -32 ) nounwind ; <double>:6 [#uses=1]
fadd double %2, %6 ; <double>:7 [#uses=1]
- getelementptr i16* %xseed, i32 2 ; <i16*>:8 [#uses=1]
+ getelementptr i16, i16* %xseed, i32 2 ; <i16*>:8 [#uses=1]
load i16* %8, align 2 ; <i16>:9 [#uses=1]
uitofp i16 %9 to double ; <double>:10 [#uses=1]
tail call double @ldexp( double %10, i32 -16 ) nounwind ; <double>:11 [#uses=1]
@@ -40,12 +40,12 @@ entry:
load i16* %xseed, align 2 ; <i16>:1 [#uses=1]
uitofp i16 %1 to double ; <double>:2 [#uses=1]
tail call double @ldexp( double %2, i32 -48 ) nounwind ; <double>:3 [#uses=1]
- getelementptr i16* %xseed, i32 1 ; <i16*>:4 [#uses=1]
+ getelementptr i16, i16* %xseed, i32 1 ; <i16*>:4 [#uses=1]
load i16* %4, align 2 ; <i16>:5 [#uses=1]
uitofp i16 %5 to double ; <double>:6 [#uses=1]
tail call double @ldexp( double %6, i32 -32 ) nounwind ; <double>:7 [#uses=1]
fadd double %3, %7 ; <double>:8 [#uses=1]
- getelementptr i16* %xseed, i32 2 ; <i16*>:9 [#uses=1]
+ getelementptr i16, i16* %xseed, i32 2 ; <i16*>:9 [#uses=1]
load i16* %9, align 2 ; <i16>:10 [#uses=1]
uitofp i16 %10 to double ; <double>:11 [#uses=1]
tail call double @ldexp( double %11, i32 -16 ) nounwind ; <double>:12 [#uses=1]
diff --git a/test/CodeGen/Mips/Fast-ISel/overflt.ll b/test/CodeGen/Mips/Fast-ISel/overflt.ll
index eeac35bba5d..3792510633d 100644
--- a/test/CodeGen/Mips/Fast-ISel/overflt.ll
+++ b/test/CodeGen/Mips/Fast-ISel/overflt.ll
@@ -13,7 +13,7 @@ define void @foo() {
entry:
; CHECK-LABEL: .ent foo
%0 = load float** @y, align 4
- %arrayidx = getelementptr inbounds float* %0, i32 64000
+ %arrayidx = getelementptr inbounds float, float* %0, i32 64000
store float 5.500000e+00, float* %arrayidx, align 4
; CHECK: lui $[[REG_FPCONST_INT:[0-9]+]], 16560
; CHECK: mtc1 $[[REG_FPCONST_INT]], $f[[REG_FPCONST:[0-9]+]]
@@ -32,7 +32,7 @@ define void @goo() {
entry:
; CHECK-LABEL: .ent goo
%0 = load float** @y, align 4
- %arrayidx = getelementptr inbounds float* %0, i32 64000
+ %arrayidx = getelementptr inbounds float, float* %0, i32 64000
%1 = load float* %arrayidx, align 4
store float %1, float* @result, align 4
; CHECK-DAG: lw $[[REG_RESULT:[0-9]+]], %got(result)(${{[0-9]+}})
diff --git a/test/CodeGen/Mips/addressing-mode.ll b/test/CodeGen/Mips/addressing-mode.ll
index ea76dde82dc..e4e3a278d64 100644
--- a/test/CodeGen/Mips/addressing-mode.ll
+++ b/test/CodeGen/Mips/addressing-mode.ll
@@ -20,9 +20,9 @@ for.cond1.preheader:
for.body3:
%s.120 = phi i32 [ %s.022, %for.cond1.preheader ], [ %add7, %for.body3 ]
%j.019 = phi i32 [ 0, %for.cond1.preheader ], [ %add8, %for.body3 ]
- %arrayidx4 = getelementptr inbounds [256 x i32]* %a, i32 %i.021, i32 %j.019
+ %arrayidx4 = getelementptr inbounds [256 x i32], [256 x i32]* %a, i32 %i.021, i32 %j.019
%0 = load i32* %arrayidx4, align 4
- %arrayidx6 = getelementptr inbounds [256 x i32]* %b, i32 %i.021, i32 %j.019
+ %arrayidx6 = getelementptr inbounds [256 x i32], [256 x i32]* %b, i32 %i.021, i32 %j.019
%1 = load i32* %arrayidx6, align 4
%add = add i32 %0, %s.120
%add7 = add i32 %add, %1
diff --git a/test/CodeGen/Mips/align16.ll b/test/CodeGen/Mips/align16.ll
index 689ae8307f5..580a89c5372 100644
--- a/test/CodeGen/Mips/align16.ll
+++ b/test/CodeGen/Mips/align16.ll
@@ -16,12 +16,12 @@ entry:
%zz = alloca i32, align 4
%z = alloca i32, align 4
%0 = load i32* @i, align 4
- %arrayidx = getelementptr inbounds [512 x i32]* %y, i32 0, i32 10
+ %arrayidx = getelementptr inbounds [512 x i32], [512 x i32]* %y, i32 0, i32 10
store i32 %0, i32* %arrayidx, align 4
%1 = load i32* @i, align 4
store i32 %1, i32* %x, align 8
call void @p(i32* %x)
- %arrayidx1 = getelementptr inbounds [512 x i32]* %y, i32 0, i32 10
+ %arrayidx1 = getelementptr inbounds [512 x i32], [512 x i32]* %y, i32 0, i32 10
call void @p(i32* %arrayidx1)
ret void
}
diff --git a/test/CodeGen/Mips/alloca.ll b/test/CodeGen/Mips/alloca.ll
index fc7ef862a32..0700ea3ab0f 100644
--- a/test/CodeGen/Mips/alloca.ll
+++ b/test/CodeGen/Mips/alloca.ll
@@ -9,7 +9,7 @@ entry:
; CHECK: move $4, $[[T0]]
; CHECK: move $4, $[[T2]]
%tmp1 = alloca i8, i32 %size, align 4
- %add.ptr = getelementptr inbounds i8* %tmp1, i32 5
+ %add.ptr = getelementptr inbounds i8, i8* %tmp1, i32 5
store i8 97, i8* %add.ptr, align 1
%tmp4 = alloca i8, i32 %size, align 4
call void @foo2(double 1.000000e+00, double 2.000000e+00, i32 3) nounwind
@@ -39,17 +39,17 @@ entry:
if.then: ; preds = %entry
; CHECK: addiu $4, $[[T0]], 40
- %add.ptr = getelementptr inbounds i8* %tmp1, i32 40
+ %add.ptr = getelementptr inbounds i8, i8* %tmp1, i32 40
%1 = bitcast i8* %add.ptr to i32*
call void @foo3(i32* %1) nounwind
- %arrayidx15.pre = getelementptr inbounds i8* %tmp1, i32 12
+ %arrayidx15.pre = getelementptr inbounds i8, i8* %tmp1, i32 12
%.pre = bitcast i8* %arrayidx15.pre to i32*
br label %if.end
if.else: ; preds = %entry
; CHECK: addiu $4, $[[T0]], 12
- %add.ptr5 = getelementptr inbounds i8* %tmp1, i32 12
+ %add.ptr5 = getelementptr inbounds i8, i8* %tmp1, i32 12
%2 = bitcast i8* %add.ptr5 to i32*
call void @foo3(i32* %2) nounwind
br label %if.end
@@ -60,20 +60,20 @@ if.end: ; preds = %if.else, %if.then
%.pre-phi = phi i32* [ %2, %if.else ], [ %.pre, %if.then ]
%tmp7 = load i32* %0, align 4
- %arrayidx9 = getelementptr inbounds i8* %tmp1, i32 4
+ %arrayidx9 = getelementptr inbounds i8, i8* %tmp1, i32 4
%3 = bitcast i8* %arrayidx9 to i32*
%tmp10 = load i32* %3, align 4
- %arrayidx12 = getelementptr inbounds i8* %tmp1, i32 8
+ %arrayidx12 = getelementptr inbounds i8, i8* %tmp1, i32 8
%4 = bitcast i8* %arrayidx12 to i32*
%tmp13 = load i32* %4, align 4
%tmp16 = load i32* %.pre-phi, align 4
- %arrayidx18 = getelementptr inbounds i8* %tmp1, i32 16
+ %arrayidx18 = getelementptr inbounds i8, i8* %tmp1, i32 16
%5 = bitcast i8* %arrayidx18 to i32*
%tmp19 = load i32* %5, align 4
- %arrayidx21 = getelementptr inbounds i8* %tmp1, i32 20
+ %arrayidx21 = getelementptr inbounds i8, i8* %tmp1, i32 20
%6 = bitcast i8* %arrayidx21 to i32*
%tmp22 = load i32* %6, align 4
- %arrayidx24 = getelementptr inbounds i8* %tmp1, i32 24
+ %arrayidx24 = getelementptr inbounds i8, i8* %tmp1, i32 24
%7 = bitcast i8* %arrayidx24 to i32*
%tmp25 = load i32* %7, align 4
%call = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([22 x i8]* @.str, i32 0, i32 0), i32 %tmp7, i32 %tmp10, i32 %tmp13, i32 %tmp16, i32 %tmp19, i32 %tmp22, i32 %tmp25) nounwind
diff --git a/test/CodeGen/Mips/alloca16.ll b/test/CodeGen/Mips/alloca16.ll
index 4f6059878c3..67ec2f9c83e 100644
--- a/test/CodeGen/Mips/alloca16.ll
+++ b/test/CodeGen/Mips/alloca16.ll
@@ -40,33 +40,33 @@ entry:
%5 = load i32* @jjjj, align 4
%6 = load i32* @iiii, align 4
%7 = load i32** %ip, align 4
- %arrayidx = getelementptr inbounds i32* %7, i32 %6
+ %arrayidx = getelementptr inbounds i32, i32* %7, i32 %6
store i32 %5, i32* %arrayidx, align 4
%8 = load i32* @kkkk, align 4
%9 = load i32* @jjjj, align 4
%10 = load i32** %ip, align 4
- %arrayidx1 = getelementptr inbounds i32* %10, i32 %9
+ %arrayidx1 = getelementptr inbounds i32, i32* %10, i32 %9
store i32 %8, i32* %arrayidx1, align 4
%11 = load i32* @iiii, align 4
%12 = load i32* @kkkk, align 4
%13 = load i32** %ip, align 4
- %arrayidx2 = getelementptr inbounds i32* %13, i32 %12
+ %arrayidx2 = getelementptr inbounds i32, i32* %13, i32 %12
store i32 %11, i32* %arrayidx2, align 4
%14 = load i32** %ip, align 4
- %arrayidx3 = getelementptr inbounds i32* %14, i32 25
+ %arrayidx3 = getelementptr inbounds i32, i32* %14, i32 25
%15 = load i32* %arrayidx3, align 4
store i32 %15, i32* @riii, align 4
%16 = load i32** %ip, align 4
- %arrayidx4 = getelementptr inbounds i32* %16, i32 35
+ %arrayidx4 = getelementptr inbounds i32, i32* %16, i32 35
%17 = load i32* %arrayidx4, align 4
store i32 %17, i32* @rjjj, align 4
%18 = load i32** %ip, align 4
- %arrayidx5 = getelementptr inbounds i32* %18, i32 100
+ %arrayidx5 = getelementptr inbounds i32, i32* %18, i32 100
%19 = load i32* %arrayidx5, align 4
store i32 %19, i32* @rkkk, align 4
%20 = load i32* @t, align 4
%21 = load i32** %ip, align 4
- %arrayidx6 = getelementptr inbounds i32* %21, i32 %20
+ %arrayidx6 = getelementptr inbounds i32, i32* %21, i32 %20
%22 = load i32* %arrayidx6, align 4
; 16: addiu $sp, -16
call void @temp(i32 %22)
diff --git a/test/CodeGen/Mips/brdelayslot.ll b/test/CodeGen/Mips/brdelayslot.ll
index 68341c1ba25..bcaba797ce4 100644
--- a/test/CodeGen/Mips/brdelayslot.ll
+++ b/test/CodeGen/Mips/brdelayslot.ll
@@ -144,7 +144,7 @@ entry:
for.body: ; preds = %entry, %for.body
%s.06 = phi i32 [ %add, %for.body ], [ 0, %entry ]
%i.05 = phi i32 [ %inc, %for.body ], [ 0, %entry ]
- %arrayidx = getelementptr inbounds i32* %a, i32 %i.05
+ %arrayidx = getelementptr inbounds i32, i32* %a, i32 %i.05
%0 = load i32* %arrayidx, align 4
%add = add nsw i32 %0, %s.06
%inc = add nsw i32 %i.05, 1
diff --git a/test/CodeGen/Mips/brind.ll b/test/CodeGen/Mips/brind.ll
index 4c591fa1bba..970dd991817 100644
--- a/test/CodeGen/Mips/brind.ll
+++ b/test/CodeGen/Mips/brind.ll
@@ -26,7 +26,7 @@ L3: ; preds = %L2, %L3
%i.2 = phi i32 [ %i.1, %L2 ], [ %inc, %L3 ]
%puts7 = tail call i32 @puts(i8* getelementptr inbounds ([2 x i8]* @str7, i32 0, i32 0))
%inc = add i32 %i.2, 1
- %arrayidx = getelementptr inbounds [5 x i8*]* @main.L, i32 0, i32 %i.2
+ %arrayidx = getelementptr inbounds [5 x i8*], [5 x i8*]* @main.L, i32 0, i32 %i.2
%0 = load i8** %arrayidx, align 4
indirectbr i8* %0, [label %L1, label %L2, label %L3, label %L4]
; 16: jrc ${{[0-9]+}}
diff --git a/test/CodeGen/Mips/cconv/arguments-float.ll b/test/CodeGen/Mips/cconv/arguments-float.ll
index ee40d7f15b8..156d6f1ee66 100644
--- a/test/CodeGen/Mips/cconv/arguments-float.ll
+++ b/test/CodeGen/Mips/cconv/arguments-float.ll
@@ -24,23 +24,23 @@
define void @double_args(double %a, double %b, double %c, double %d, double %e,
double %f, double %g, double %h, double %i) nounwind {
entry:
- %0 = getelementptr [11 x double]* @doubles, i32 0, i32 1
+ %0 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 1
store volatile double %a, double* %0
- %1 = getelementptr [11 x double]* @doubles, i32 0, i32 2
+ %1 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 2
store volatile double %b, double* %1
- %2 = getelementptr [11 x double]* @doubles, i32 0, i32 3
+ %2 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 3
store volatile double %c, double* %2
- %3 = getelementptr [11 x double]* @doubles, i32 0, i32 4
+ %3 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 4
store volatile double %d, double* %3
- %4 = getelementptr [11 x double]* @doubles, i32 0, i32 5
+ %4 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 5
store volatile double %e, double* %4
- %5 = getelementptr [11 x double]* @doubles, i32 0, i32 6
+ %5 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 6
store volatile double %f, double* %5
- %6 = getelementptr [11 x double]* @doubles, i32 0, i32 7
+ %6 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 7
store volatile double %g, double* %6
- %7 = getelementptr [11 x double]* @doubles, i32 0, i32 8
+ %7 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 8
store volatile double %h, double* %7
- %8 = getelementptr [11 x double]* @doubles, i32 0, i32 9
+ %8 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 9
store volatile double %i, double* %8
ret void
}
@@ -105,25 +105,25 @@ define void @float_args(float %a, float %b, float %c, float %d, float %e,
float %f, float %g, float %h, float %i, float %j)
nounwind {
entry:
- %0 = getelementptr [11 x float]* @floats, i32 0, i32 1
+ %0 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 1
store volatile float %a, float* %0
- %1 = getelementptr [11 x float]* @floats, i32 0, i32 2
+ %1 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 2
store volatile float %b, float* %1
- %2 = getelementptr [11 x float]* @floats, i32 0, i32 3
+ %2 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 3
store volatile float %c, float* %2
- %3 = getelementptr [11 x float]* @floats, i32 0, i32 4
+ %3 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 4
store volatile float %d, float* %3
- %4 = getelementptr [11 x float]* @floats, i32 0, i32 5
+ %4 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 5
store volatile float %e, float* %4
- %5 = getelementptr [11 x float]* @floats, i32 0, i32 6
+ %5 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 6
store volatile float %f, float* %5
- %6 = getelementptr [11 x float]* @floats, i32 0, i32 7
+ %6 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 7
store volatile float %g, float* %6
- %7 = getelementptr [11 x float]* @floats, i32 0, i32 8
+ %7 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 8
store volatile float %h, float* %7
- %8 = getelementptr [11 x float]* @floats, i32 0, i32 9
+ %8 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 9
store volatile float %i, float* %8
- %9 = getelementptr [11 x float]* @floats, i32 0, i32 10
+ %9 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 10
store volatile float %j, float* %9
ret void
}
@@ -170,9 +170,9 @@ entry:
define void @double_arg2(i8 %a, double %b) nounwind {
entry:
- %0 = getelementptr [11 x i8]* @bytes, i32 0, i32 1
+ %0 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 1
store volatile i8 %a, i8* %0
- %1 = getelementptr [11 x double]* @doubles, i32 0, i32 1
+ %1 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 1
store volatile double %b, double* %1
ret void
}
@@ -197,9 +197,9 @@ entry:
define void @float_arg2(i8 signext %a, float %b) nounwind {
entry:
- %0 = getelementptr [11 x i8]* @bytes, i32 0, i32 1
+ %0 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 1
store volatile i8 %a, i8* %0
- %1 = getelementptr [11 x float]* @floats, i32 0, i32 1
+ %1 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 1
store volatile float %b, float* %1
ret void
}
diff --git a/test/CodeGen/Mips/cconv/arguments-fp128.ll b/test/CodeGen/Mips/cconv/arguments-fp128.ll
index 166697442dc..fabc107917f 100644
--- a/test/CodeGen/Mips/cconv/arguments-fp128.ll
+++ b/test/CodeGen/Mips/cconv/arguments-fp128.ll
@@ -13,15 +13,15 @@
define void @ldouble_args(fp128 %a, fp128 %b, fp128 %c, fp128 %d, fp128 %e) nounwind {
entry:
- %0 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 1
+ %0 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 1
store volatile fp128 %a, fp128* %0
- %1 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 2
+ %1 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 2
store volatile fp128 %b, fp128* %1
- %2 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 3
+ %2 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 3
store volatile fp128 %c, fp128* %2
- %3 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 4
+ %3 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 4
store volatile fp128 %d, fp128* %3
- %4 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 5
+ %4 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 5
store volatile fp128 %e, fp128* %4
ret void
}
diff --git a/test/CodeGen/Mips/cconv/arguments-hard-float-varargs.ll b/test/CodeGen/Mips/cconv/arguments-hard-float-varargs.ll
index 380bd5cf606..9f1fe91ec17 100644
--- a/test/CodeGen/Mips/cconv/arguments-hard-float-varargs.ll
+++ b/test/CodeGen/Mips/cconv/arguments-hard-float-varargs.ll
@@ -25,14 +25,14 @@
define void @double_args(double %a, ...)
nounwind {
entry:
- %0 = getelementptr [11 x double]* @doubles, i32 0, i32 1
+ %0 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 1
store volatile double %a, double* %0
%ap = alloca i8*
%ap2 = bitcast i8** %ap to i8*
call void @llvm.va_start(i8* %ap2)
%b = va_arg i8** %ap, double
- %1 = getelementptr [11 x double]* @doubles, i32 0, i32 2
+ %1 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 2
store volatile double %b, double* %1
call void @llvm.va_end(i8* %ap2)
ret void
@@ -90,14 +90,14 @@ entry:
define void @float_args(float %a, ...) nounwind {
entry:
- %0 = getelementptr [11 x float]* @floats, i32 0, i32 1
+ %0 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 1
store volatile float %a, float* %0
%ap = alloca i8*
%ap2 = bitcast i8** %ap to i8*
call void @llvm.va_start(i8* %ap2)
%b = va_arg i8** %ap, float
- %1 = getelementptr [11 x float]* @floats, i32 0, i32 2
+ %1 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 2
store volatile float %b, float* %1
call void @llvm.va_end(i8* %ap2)
ret void
diff --git a/test/CodeGen/Mips/cconv/arguments-hard-float.ll b/test/CodeGen/Mips/cconv/arguments-hard-float.ll
index 3221e234b70..24148ed176d 100644
--- a/test/CodeGen/Mips/cconv/arguments-hard-float.ll
+++ b/test/CodeGen/Mips/cconv/arguments-hard-float.ll
@@ -24,23 +24,23 @@
define void @double_args(double %a, double %b, double %c, double %d, double %e,
double %f, double %g, double %h, double %i) nounwind {
entry:
- %0 = getelementptr [11 x double]* @doubles, i32 0, i32 1
+ %0 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 1
store volatile double %a, double* %0
- %1 = getelementptr [11 x double]* @doubles, i32 0, i32 2
+ %1 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 2
store volatile double %b, double* %1
- %2 = getelementptr [11 x double]* @doubles, i32 0, i32 3
+ %2 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 3
store volatile double %c, double* %2
- %3 = getelementptr [11 x double]* @doubles, i32 0, i32 4
+ %3 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 4
store volatile double %d, double* %3
- %4 = getelementptr [11 x double]* @doubles, i32 0, i32 5
+ %4 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 5
store volatile double %e, double* %4
- %5 = getelementptr [11 x double]* @doubles, i32 0, i32 6
+ %5 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 6
store volatile double %f, double* %5
- %6 = getelementptr [11 x double]* @doubles, i32 0, i32 7
+ %6 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 7
store volatile double %g, double* %6
- %7 = getelementptr [11 x double]* @doubles, i32 0, i32 8
+ %7 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 8
store volatile double %h, double* %7
- %8 = getelementptr [11 x double]* @doubles, i32 0, i32 9
+ %8 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 9
store volatile double %i, double* %8
ret void
}
@@ -87,23 +87,23 @@ entry:
define void @float_args(float %a, float %b, float %c, float %d, float %e,
float %f, float %g, float %h, float %i) nounwind {
entry:
- %0 = getelementptr [11 x float]* @floats, i32 0, i32 1
+ %0 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 1
store volatile float %a, float* %0
- %1 = getelementptr [11 x float]* @floats, i32 0, i32 2
+ %1 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 2
store volatile float %b, float* %1
- %2 = getelementptr [11 x float]* @floats, i32 0, i32 3
+ %2 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 3
store volatile float %c, float* %2
- %3 = getelementptr [11 x float]* @floats, i32 0, i32 4
+ %3 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 4
store volatile float %d, float* %3
- %4 = getelementptr [11 x float]* @floats, i32 0, i32 5
+ %4 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 5
store volatile float %e, float* %4
- %5 = getelementptr [11 x float]* @floats, i32 0, i32 6
+ %5 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 6
store volatile float %f, float* %5
- %6 = getelementptr [11 x float]* @floats, i32 0, i32 7
+ %6 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 7
store volatile float %g, float* %6
- %7 = getelementptr [11 x float]* @floats, i32 0, i32 8
+ %7 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 8
store volatile float %h, float* %7
- %8 = getelementptr [11 x float]* @floats, i32 0, i32 9
+ %8 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 9
store volatile float %i, float* %8
ret void
}
@@ -153,9 +153,9 @@ entry:
define void @double_arg2(i8 %a, double %b) nounwind {
entry:
- %0 = getelementptr [11 x i8]* @bytes, i32 0, i32 1
+ %0 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 1
store volatile i8 %a, i8* %0
- %1 = getelementptr [11 x double]* @doubles, i32 0, i32 1
+ %1 = getelementptr [11 x double], [11 x double]* @doubles, i32 0, i32 1
store volatile double %b, double* %1
ret void
}
@@ -184,9 +184,9 @@ entry:
define void @float_arg2(i8 %a, float %b) nounwind {
entry:
- %0 = getelementptr [11 x i8]* @bytes, i32 0, i32 1
+ %0 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 1
store volatile i8 %a, i8* %0
- %1 = getelementptr [11 x float]* @floats, i32 0, i32 1
+ %1 = getelementptr [11 x float], [11 x float]* @floats, i32 0, i32 1
store volatile float %b, float* %1
ret void
}
diff --git a/test/CodeGen/Mips/cconv/arguments-hard-fp128.ll b/test/CodeGen/Mips/cconv/arguments-hard-fp128.ll
index 583759a2428..26eb569f865 100644
--- a/test/CodeGen/Mips/cconv/arguments-hard-fp128.ll
+++ b/test/CodeGen/Mips/cconv/arguments-hard-fp128.ll
@@ -13,15 +13,15 @@
define void @ldouble_args(fp128 %a, fp128 %b, fp128 %c, fp128 %d, fp128 %e) nounwind {
entry:
- %0 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 1
+ %0 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 1
store volatile fp128 %a, fp128* %0
- %1 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 2
+ %1 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 2
store volatile fp128 %b, fp128* %1
- %2 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 3
+ %2 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 3
store volatile fp128 %c, fp128* %2
- %3 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 4
+ %3 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 4
store volatile fp128 %d, fp128* %3
- %4 = getelementptr [11 x fp128]* @ldoubles, i32 0, i32 5
+ %4 = getelementptr [11 x fp128], [11 x fp128]* @ldoubles, i32 0, i32 5
store volatile fp128 %e, fp128* %4
ret void
}
diff --git a/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll b/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll
index 458b124c992..d1f07a6cf01 100644
--- a/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll
+++ b/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll
@@ -142,7 +142,7 @@ entry:
store %struct.SmallStruct_1b* %ss, %struct.SmallStruct_1b** %ss.addr, align 8
%0 = load %struct.SmallStruct_1b** %ss.addr, align 8
%1 = bitcast %struct.SmallStruct_1b* %0 to { i8 }*
- %2 = getelementptr { i8 }* %1, i32 0, i32 0
+ %2 = getelementptr { i8 }, { i8 }* %1, i32 0, i32 0
%3 = load i8* %2, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i8 inreg %3)
ret void
@@ -156,7 +156,7 @@ entry:
store %struct.SmallStruct_2b* %ss, %struct.SmallStruct_2b** %ss.addr, align 8
%0 = load %struct.SmallStruct_2b** %ss.addr, align 8
%1 = bitcast %struct.SmallStruct_2b* %0 to { i16 }*
- %2 = getelementptr { i16 }* %1, i32 0, i32 0
+ %2 = getelementptr { i16 }, { i16 }* %1, i32 0, i32 0
%3 = load i16* %2, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i16 inreg %3)
ret void
@@ -173,7 +173,7 @@ entry:
%1 = bitcast { i24 }* %.coerce to i8*
%2 = bitcast %struct.SmallStruct_3b* %0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 3, i32 0, i1 false)
- %3 = getelementptr { i24 }* %.coerce, i32 0, i32 0
+ %3 = getelementptr { i24 }, { i24 }* %.coerce, i32 0, i32 0
%4 = load i24* %3, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i24 inreg %4)
ret void
@@ -189,7 +189,7 @@ entry:
store %struct.SmallStruct_4b* %ss, %struct.SmallStruct_4b** %ss.addr, align 8
%0 = load %struct.SmallStruct_4b** %ss.addr, align 8
%1 = bitcast %struct.SmallStruct_4b* %0 to { i32 }*
- %2 = getelementptr { i32 }* %1, i32 0, i32 0
+ %2 = getelementptr { i32 }, { i32 }* %1, i32 0, i32 0
%3 = load i32* %2, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i32 inreg %3)
ret void
@@ -206,7 +206,7 @@ entry:
%1 = bitcast { i40 }* %.coerce to i8*
%2 = bitcast %struct.SmallStruct_5b* %0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 5, i32 0, i1 false)
- %3 = getelementptr { i40 }* %.coerce, i32 0, i32 0
+ %3 = getelementptr { i40 }, { i40 }* %.coerce, i32 0, i32 0
%4 = load i40* %3, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i40 inreg %4)
ret void
@@ -223,7 +223,7 @@ entry:
%1 = bitcast { i48 }* %.coerce to i8*
%2 = bitcast %struct.SmallStruct_6b* %0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 6, i32 0, i1 false)
- %3 = getelementptr { i48 }* %.coerce, i32 0, i32 0
+ %3 = getelementptr { i48 }, { i48 }* %.coerce, i32 0, i32 0
%4 = load i48* %3, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i48 inreg %4)
ret void
@@ -240,7 +240,7 @@ entry:
%1 = bitcast { i56 }* %.coerce to i8*
%2 = bitcast %struct.SmallStruct_7b* %0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 7, i32 0, i1 false)
- %3 = getelementptr { i56 }* %.coerce, i32 0, i32 0
+ %3 = getelementptr { i56 }, { i56 }* %.coerce, i32 0, i32 0
%4 = load i56* %3, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i56 inreg %4)
ret void
@@ -254,7 +254,7 @@ entry:
store %struct.SmallStruct_8b* %ss, %struct.SmallStruct_8b** %ss.addr, align 8
%0 = load %struct.SmallStruct_8b** %ss.addr, align 8
%1 = bitcast %struct.SmallStruct_8b* %0 to { i64 }*
- %2 = getelementptr { i64 }* %1, i32 0, i32 0
+ %2 = getelementptr { i64 }, { i64 }* %1, i32 0, i32 0
%3 = load i64* %2, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i64 inreg %3)
ret void
@@ -271,9 +271,9 @@ entry:
%1 = bitcast { i64, i8 }* %.coerce to i8*
%2 = bitcast %struct.SmallStruct_9b* %0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 9, i32 0, i1 false)
- %3 = getelementptr { i64, i8 }* %.coerce, i32 0, i32 0
+ %3 = getelementptr { i64, i8 }, { i64, i8 }* %.coerce, i32 0, i32 0
%4 = load i64* %3, align 1
- %5 = getelementptr { i64, i8 }* %.coerce, i32 0, i32 1
+ %5 = getelementptr { i64, i8 }, { i64, i8 }* %.coerce, i32 0, i32 1
%6 = load i8* %5, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i64 inreg %4, i8 inreg %6)
ret void
diff --git a/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll b/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll
index 899a3e8ff0a..c5e4e9307f0 100644
--- a/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll
+++ b/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll
@@ -76,7 +76,7 @@ entry:
store %struct.SmallStruct_1b1s* %ss, %struct.SmallStruct_1b1s** %ss.addr, align 8
%0 = load %struct.SmallStruct_1b1s** %ss.addr, align 8
%1 = bitcast %struct.SmallStruct_1b1s* %0 to { i32 }*
- %2 = getelementptr { i32 }* %1, i32 0, i32 0
+ %2 = getelementptr { i32 }, { i32 }* %1, i32 0, i32 0
%3 = load i32* %2, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i32 inreg %3)
ret void
@@ -90,7 +90,7 @@ entry:
store %struct.SmallStruct_1b1i* %ss, %struct.SmallStruct_1b1i** %ss.addr, align 8
%0 = load %struct.SmallStruct_1b1i** %ss.addr, align 8
%1 = bitcast %struct.SmallStruct_1b1i* %0 to { i64 }*
- %2 = getelementptr { i64 }* %1, i32 0, i32 0
+ %2 = getelementptr { i64 }, { i64 }* %1, i32 0, i32 0
%3 = load i64* %2, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i64 inreg %3)
ret void
@@ -107,7 +107,7 @@ entry:
%1 = bitcast { i48 }* %.coerce to i8*
%2 = bitcast %struct.SmallStruct_1b1s1b* %0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 6, i32 0, i1 false)
- %3 = getelementptr { i48 }* %.coerce, i32 0, i32 0
+ %3 = getelementptr { i48 }, { i48 }* %.coerce, i32 0, i32 0
%4 = load i48* %3, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i48 inreg %4)
ret void
@@ -123,7 +123,7 @@ entry:
store %struct.SmallStruct_1s1i* %ss, %struct.SmallStruct_1s1i** %ss.addr, align 8
%0 = load %struct.SmallStruct_1s1i** %ss.addr, align 8
%1 = bitcast %struct.SmallStruct_1s1i* %0 to { i64 }*
- %2 = getelementptr { i64 }* %1, i32 0, i32 0
+ %2 = getelementptr { i64 }, { i64 }* %1, i32 0, i32 0
%3 = load i64* %2, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i64 inreg %3)
ret void
@@ -140,7 +140,7 @@ entry:
%1 = bitcast { i48 }* %.coerce to i8*
%2 = bitcast %struct.SmallStruct_3b1s* %0 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %1, i8* %2, i64 6, i32 0, i1 false)
- %3 = getelementptr { i48 }* %.coerce, i32 0, i32 0
+ %3 = getelementptr { i48 }, { i48 }* %.coerce, i32 0, i32 0
%4 = load i48* %3, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i48 inreg %4)
ret void
diff --git a/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-multiple-args.ll b/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-multiple-args.ll
index 1f736252334..a9e85632f1d 100644
--- a/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-multiple-args.ll
+++ b/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-multiple-args.ll
@@ -120,31 +120,31 @@ entry:
%7 = load %struct.SmallStruct_1b** %ss8.addr, align 8
%8 = load %struct.SmallStruct_1b** %ss9.addr, align 8
%9 = bitcast %struct.SmallStruct_1b* %0 to { i8 }*
- %10 = getelementptr { i8 }* %9, i32 0, i32 0
+ %10 = getelementptr { i8 }, { i8 }* %9, i32 0, i32 0
%11 = load i8* %10, align 1
%12 = bitcast %struct.SmallStruct_1b* %1 to { i8 }*
- %13 = getelementptr { i8 }* %12, i32 0, i32 0
+ %13 = getelementptr { i8 }, { i8 }* %12, i32 0, i32 0
%14 = load i8* %13, align 1
%15 = bitcast %struct.SmallStruct_1b* %2 to { i8 }*
- %16 = getelementptr { i8 }* %15, i32 0, i32 0
+ %16 = getelementptr { i8 }, { i8 }* %15, i32 0, i32 0
%17 = load i8* %16, align 1
%18 = bitcast %struct.SmallStruct_1b* %3 to { i8 }*
- %19 = getelementptr { i8 }* %18, i32 0, i32 0
+ %19 = getelementptr { i8 }, { i8 }* %18, i32 0, i32 0
%20 = load i8* %19, align 1
%21 = bitcast %struct.SmallStruct_1b* %4 to { i8 }*
- %22 = getelementptr { i8 }* %21, i32 0, i32 0
+ %22 = getelementptr { i8 }, { i8 }* %21, i32 0, i32 0
%23 = load i8* %22, align 1
%24 = bitcast %struct.SmallStruct_1b* %5 to { i8 }*
- %25 = getelementptr { i8 }* %24, i32 0, i32 0
+ %25 = getelementptr { i8 }, { i8 }* %24, i32 0, i32 0
%26 = load i8* %25, align 1
%27 = bitcast %struct.SmallStruct_1b* %6 to { i8 }*
- %28 = getelementptr { i8 }* %27, i32 0, i32 0
+ %28 = getelementptr { i8 }, { i8 }* %27, i32 0, i32 0
%29 = load i8* %28, align 1
%30 = bitcast %struct.SmallStruct_1b* %7 to { i8 }*
- %31 = getelementptr { i8 }* %30, i32 0, i32 0
+ %31 = getelementptr { i8 }, { i8 }* %30, i32 0, i32 0
%32 = load i8* %31, align 1
%33 = bitcast %struct.SmallStruct_1b* %8 to { i8 }*
- %34 = getelementptr { i8 }* %33, i32 0, i32 0
+ %34 = getelementptr { i8 }, { i8 }* %33, i32 0, i32 0
%35 = load i8* %34, align 1
call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8]* @.str, i32 0, i32 0), i8 inreg %11, i8 inreg %14, i8 inreg %17, i8 inreg %20, i8 inreg %23, i8 inreg %26, i8 inreg %29, i8 inreg %32, i8 inreg %35)
ret void
diff --git a/test/CodeGen/Mips/cconv/arguments-varargs.ll b/test/CodeGen/Mips/cconv/arguments-varargs.ll
index 6e6f48b1daa..af217c92dab 100644
--- a/test/CodeGen/Mips/cconv/arguments-varargs.ll
+++ b/test/CodeGen/Mips/cconv/arguments-varargs.ll
@@ -119,12 +119,12 @@ entry:
call void asm sideeffect "# ANCHOR1", ""()
%arg1 = va_arg i8** %ap, i16
- %e1 = getelementptr [3 x i16]* @hwords, i32 0, i32 1
+ %e1 = getelementptr [3 x i16], [3 x i16]* @hwords, i32 0, i32 1
store volatile i16 %arg1, i16* %e1, align 2
call void asm sideeffect "# ANCHOR2", ""()
%arg2 = va_arg i8** %ap, i16
- %e2 = getelementptr [3 x i16]* @hwords, i32 0, i32 2
+ %e2 = getelementptr [3 x i16], [3 x i16]* @hwords, i32 0, i32 2
store volatile i16 %arg2, i16* %e2, align 2
call void @llvm.va_end(i8* %ap2)
@@ -237,12 +237,12 @@ entry:
call void asm sideeffect "# ANCHOR1", ""()
%arg1 = va_arg i8** %ap, i32
- %e1 = getelementptr [3 x i32]* @words, i32 0, i32 1
+ %e1 = getelementptr [3 x i32], [3 x i32]* @words, i32 0, i32 1
store volatile i32 %arg1, i32* %e1, align 4
call void asm sideeffect "# ANCHOR2", ""()
%arg2 = va_arg i8** %ap, i32
- %e2 = getelementptr [3 x i32]* @words, i32 0, i32 2
+ %e2 = getelementptr [3 x i32], [3 x i32]* @words, i32 0, i32 2
store volatile i32 %arg2, i32* %e2, align 4
call void @llvm.va_end(i8* %ap2)
@@ -364,12 +364,12 @@ entry:
call void asm sideeffect "# ANCHOR1", ""()
%arg1 = va_arg i8** %ap, i64
- %e1 = getelementptr [3 x i64]* @dwords, i32 0, i32 1
+ %e1 = getelementptr [3 x i64], [3 x i64]* @dwords, i32 0, i32 1
store volatile i64 %arg1, i64* %e1, align 8
call void asm sideeffect "# ANCHOR2", ""()
%arg2 = va_arg i8** %ap, i64
- %e2 = getelementptr [3 x i64]* @dwords, i32 0, i32 2
+ %e2 = getelementptr [3 x i64], [3 x i64]* @dwords, i32 0, i32 2
store volatile i64 %arg2, i64* %e2, align 8
call void @llvm.va_end(i8* %ap2)
@@ -482,12 +482,12 @@ entry:
call void asm sideeffect "# ANCHOR1", ""()
%arg1 = va_arg i8** %ap, i16
- %e1 = getelementptr [3 x i16]* @hwords, i32 0, i32 1
+ %e1 = getelementptr [3 x i16], [3 x i16]* @hwords, i32 0, i32 1
store volatile i16 %arg1, i16* %e1, align 2
call void asm sideeffect "# ANCHOR2", ""()
%arg2 = va_arg i8** %ap, i16
- %e2 = getelementptr [3 x i16]* @hwords, i32 0, i32 2
+ %e2 = getelementptr [3 x i16], [3 x i16]* @hwords, i32 0, i32 2
store volatile i16 %arg2, i16* %e2, align 2
call void @llvm.va_end(i8* %ap2)
@@ -600,12 +600,12 @@ entry:
call void asm sideeffect "# ANCHOR1", ""()
%arg1 = va_arg i8** %ap, i32
- %e1 = getelementptr [3 x i32]* @words, i32 0, i32 1
+ %e1 = getelementptr [3 x i32], [3 x i32]* @words, i32 0, i32 1
store volatile i32 %arg1, i32* %e1, align 4
call void asm sideeffect "# ANCHOR2", ""()
%arg2 = va_arg i8** %ap, i32
- %e2 = getelementptr [3 x i32]* @words, i32 0, i32 2
+ %e2 = getelementptr [3 x i32], [3 x i32]* @words, i32 0, i32 2
store volatile i32 %arg2, i32* %e2, align 4
call void @llvm.va_end(i8* %ap2)
@@ -727,12 +727,12 @@ entry:
call void asm sideeffect "# ANCHOR1", ""()
%arg1 = va_arg i8** %ap, i64
- %e1 = getelementptr [3 x i64]* @dwords, i32 0, i32 1
+ %e1 = getelementptr [3 x i64], [3 x i64]* @dwords, i32 0, i32 1
store volatile i64 %arg1, i64* %e1, align 8
call void asm sideeffect "# ANCHOR2", ""()
%arg2 = va_arg i8** %ap, i64
- %e2 = getelementptr [3 x i64]* @dwords, i32 0, i32 2
+ %e2 = getelementptr [3 x i64], [3 x i64]* @dwords, i32 0, i32 2
store volatile i64 %arg2, i64* %e2, align 8
call void @llvm.va_end(i8* %ap2)
@@ -844,12 +844,12 @@ entry:
call void asm sideeffect "# ANCHOR1", ""()
%arg1 = va_arg i8** %ap, i16
- %e1 = getelementptr [3 x i16]* @hwords, i32 0, i32 1
+ %e1 = getelementptr [3 x i16], [3 x i16]* @hwords, i32 0, i32 1
store volatile i16 %arg1, i16* %e1, align 2
call void asm sideeffect "# ANCHOR2", ""()
%arg2 = va_arg i8** %ap, i16
- %e2 = getelementptr [3 x i16]* @hwords, i32 0, i32 2
+ %e2 = getelementptr [3 x i16], [3 x i16]* @hwords, i32 0, i32 2
store volatile i16 %arg2, i16* %e2, align 2
call void @llvm.va_end(i8* %ap2)
@@ -961,12 +961,12 @@ entry:
call void asm sideeffect "# ANCHOR1", ""()
%arg1 = va_arg i8** %ap, i32
- %e1 = getelementptr [3 x i32]* @words, i32 0, i32 1
+ %e1 = getelementptr [3 x i32], [3 x i32]* @words, i32 0, i32 1
store volatile i32 %arg1, i32* %e1, align 4
call void asm sideeffect "# ANCHOR2", ""()
%arg2 = va_arg i8** %ap, i32
- %e2 = getelementptr [3 x i32]* @words, i32 0, i32 2
+ %e2 = getelementptr [3 x i32], [3 x i32]* @words, i32 0, i32 2
store volatile i32 %arg2, i32* %e2, align 4
call void @llvm.va_end(i8* %ap2)
@@ -1087,12 +1087,12 @@ entry:
call void asm sideeffect "# ANCHOR1", ""()
%arg1 = va_arg i8** %ap, i64
- %e1 = getelementptr [3 x i64]* @dwords, i32 0, i32 1
+ %e1 = getelementptr [3 x i64], [3 x i64]* @dwords, i32 0, i32 1
store volatile i64 %arg1, i64* %e1, align 8
call void asm sideeffect "# ANCHOR2", ""()
%arg2 = va_arg i8** %ap, i64
- %e2 = getelementptr [3 x i64]* @dwords, i32 0, i32 2
+ %e2 = getelementptr [3 x i64], [3 x i64]* @dwords, i32 0, i32 2
store volatile i64 %arg2, i64* %e2, align 8
call void @llvm.va_end(i8* %ap2)
diff --git a/test/CodeGen/Mips/cconv/arguments.ll b/test/CodeGen/Mips/cconv/arguments.ll
index 98671aaa13f..430705f8d41 100644
--- a/test/CodeGen/Mips/cconv/arguments.ll
+++ b/test/CodeGen/Mips/cconv/arguments.ll
@@ -28,25 +28,25 @@ define void @align_to_arg_slots(i8 signext %a, i8 signext %b, i8 signext %c,
i8 signext %g, i8 signext %h, i8 signext %i,
i8 signext %j) nounwind {
entry:
- %0 = getelementptr [11 x i8]* @bytes, i32 0, i32 1
+ %0 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 1
store volatile i8 %a, i8* %0
- %1 = getelementptr [11 x i8]* @bytes, i32 0, i32 2
+ %1 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 2
store volatile i8 %b, i8* %1
- %2 = getelementptr [11 x i8]* @bytes, i32 0, i32 3
+ %2 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 3
store volatile i8 %c, i8* %2
- %3 = getelementptr [11 x i8]* @bytes, i32 0, i32 4
+ %3 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 4
store volatile i8 %d, i8* %3
- %4 = getelementptr [11 x i8]* @bytes, i32 0, i32 5
+ %4 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 5
store volatile i8 %e, i8* %4
- %5 = getelementptr [11 x i8]* @bytes, i32 0, i32 6
+ %5 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 6
store volatile i8 %f, i8* %5
- %6 = getelementptr [11 x i8]* @bytes, i32 0, i32 7
+ %6 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 7
store volatile i8 %g, i8* %6
- %7 = getelementptr [11 x i8]* @bytes, i32 0, i32 8
+ %7 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 8
store volatile i8 %h, i8* %7
- %8 = getelementptr [11 x i8]* @bytes, i32 0, i32 9
+ %8 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 9
store volatile i8 %i, i8* %8
- %9 = getelementptr [11 x i8]* @bytes, i32 0, i32 10
+ %9 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 10
store volatile i8 %j, i8* %9
ret void
}
@@ -95,23 +95,23 @@ define void @slot_skipping(i8 signext %a, i64 signext %b, i8 signext %c,
i8 signext %d, i8 signext %e, i8 signext %f,
i8 signext %g, i64 signext %i, i8 signext %j) nounwind {
entry:
- %0 = getelementptr [11 x i8]* @bytes, i32 0, i32 1
+ %0 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 1
store volatile i8 %a, i8* %0
- %1 = getelementptr [11 x i64]* @dwords, i32 0, i32 1
+ %1 = getelementptr [11 x i64], [11 x i64]* @dwords, i32 0, i32 1
store volatile i64 %b, i64* %1
- %2 = getelementptr [11 x i8]* @bytes, i32 0, i32 2
+ %2 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 2
store volatile i8 %c, i8* %2
- %3 = getelementptr [11 x i8]* @bytes, i32 0, i32 3
+ %3 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 3
store volatile i8 %d, i8* %3
- %4 = getelementptr [11 x i8]* @bytes, i32 0, i32 4
+ %4 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 4
store volatile i8 %e, i8* %4
- %5 = getelementptr [11 x i8]* @bytes, i32 0, i32 5
+ %5 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 5
store volatile i8 %f, i8* %5
- %6 = getelementptr [11 x i8]* @bytes, i32 0, i32 6
+ %6 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 6
store volatile i8 %g, i8* %6
- %7 = getelementptr [11 x i64]* @dwords, i32 0, i32 2
+ %7 = getelementptr [11 x i64], [11 x i64]* @dwords, i32 0, i32 2
store volatile i64 %i, i64* %7
- %8 = getelementptr [11 x i8]* @bytes, i32 0, i32 7
+ %8 = getelementptr [11 x i8], [11 x i8]* @bytes, i32 0, i32 7
store volatile i8 %j, i8* %8
ret void
}
diff --git a/test/CodeGen/Mips/cmplarge.ll b/test/CodeGen/Mips/cmplarge.ll
index 2a3d30a9549..43fc10dda68 100644
--- a/test/CodeGen/Mips/cmplarge.ll
+++ b/test/CodeGen/Mips/cmplarge.ll
@@ -9,7 +9,7 @@ target triple = "mipsel--linux-gnu"
define void @getSubImagesLuma(%struct.StorablePicture* nocapture %s) #0 {
entry:
- %size_y = getelementptr inbounds %struct.StorablePicture* %s, i32 0, i32 1
+ %size_y = getelementptr inbounds %struct.StorablePicture, %struct.StorablePicture* %s, i32 0, i32 1
%0 = load i32* %size_y, align 4
%sub = add nsw i32 %0, -1
%add5 = add nsw i32 %0, 20
diff --git a/test/CodeGen/Mips/dsp-patterns.ll b/test/CodeGen/Mips/dsp-patterns.ll
index f5bb3abed90..067003a8a8c 100644
--- a/test/CodeGen/Mips/dsp-patterns.ll
+++ b/test/CodeGen/Mips/dsp-patterns.ll
@@ -6,7 +6,7 @@
define zeroext i8 @test_lbux(i8* nocapture %b, i32 %i) {
entry:
- %add.ptr = getelementptr inbounds i8* %b, i32 %i
+ %add.ptr = getelementptr inbounds i8, i8* %b, i32 %i
%0 = load i8* %add.ptr, align 1
ret i8 %0
}
@@ -16,7 +16,7 @@ entry:
define signext i16 @test_lhx(i16* nocapture %b, i32 %i) {
entry:
- %add.ptr = getelementptr inbounds i16* %b, i32 %i
+ %add.ptr = getelementptr inbounds i16, i16* %b, i32 %i
%0 = load i16* %add.ptr, align 2
ret i16 %0
}
@@ -26,7 +26,7 @@ entry:
define i32 @test_lwx(i32* nocapture %b, i32 %i) {
entry:
- %add.ptr = getelementptr inbounds i32* %b, i32 %i
+ %add.ptr = getelementptr inbounds i32, i32* %b, i32 %i
%0 = load i32* %add.ptr, align 4
ret i32 %0
}
diff --git a/test/CodeGen/Mips/fp-indexed-ls.ll b/test/CodeGen/Mips/fp-indexed-ls.ll
index ea337de9c33..3ff9b373c8e 100644
--- a/test/CodeGen/Mips/fp-indexed-ls.ll
+++ b/test/CodeGen/Mips/fp-indexed-ls.ll
@@ -45,7 +45,7 @@ entry:
; CHECK-NACL-NOT: lwxc1
- %arrayidx = getelementptr inbounds float* %b, i32 %o
+ %arrayidx = getelementptr inbounds float, float* %b, i32 %o
%0 = load float* %arrayidx, align 4
ret float %0
}
@@ -76,7 +76,7 @@ entry:
; CHECK-NACL-NOT: ldxc1
- %arrayidx = getelementptr inbounds double* %b, i32 %o
+ %arrayidx = getelementptr inbounds double, double* %b, i32 %o
%0 = load double* %arrayidx, align 8
ret double %0
}
@@ -100,7 +100,7 @@ entry:
; luxc1 was removed in MIPS64r6
; MIPS64R6-NOT: luxc1
- %arrayidx1 = getelementptr inbounds [4 x %struct.S]* @s, i32 0, i32 %b, i32 0, i32 %c
+ %arrayidx1 = getelementptr inbounds [4 x %struct.S], [4 x %struct.S]* @s, i32 0, i32 %b, i32 0, i32 %c
%0 = load float* %arrayidx1, align 1
ret float %0
}
@@ -130,7 +130,7 @@ entry:
; CHECK-NACL-NOT: swxc1
%0 = load float* @gf, align 4
- %arrayidx = getelementptr inbounds float* %b, i32 %o
+ %arrayidx = getelementptr inbounds float, float* %b, i32 %o
store float %0, float* %arrayidx, align 4
ret void
}
@@ -160,7 +160,7 @@ entry:
; CHECK-NACL-NOT: sdxc1
%0 = load double* @gd, align 8
- %arrayidx = getelementptr inbounds double* %b, i32 %o
+ %arrayidx = getelementptr inbounds double, double* %b, i32 %o
store double %0, double* %arrayidx, align 8
ret void
}
@@ -180,7 +180,7 @@ entry:
; MIPS64R6-NOT: suxc1
%0 = load float* @gf, align 4
- %arrayidx1 = getelementptr inbounds [4 x %struct.S]* @s, i32 0, i32 %b, i32 0, i32 %c
+ %arrayidx1 = getelementptr inbounds [4 x %struct.S], [4 x %struct.S]* @s, i32 0, i32 %b, i32 0, i32 %c
store float %0, float* %arrayidx1, align 1
ret void
}
@@ -199,7 +199,7 @@ entry:
; MIPS64R6-NOT: luxc1
- %arrayidx1 = getelementptr inbounds [4 x %struct.S2]* @s2, i32 0, i32 %b, i32 0, i32 %c
+ %arrayidx1 = getelementptr inbounds [4 x %struct.S2], [4 x %struct.S2]* @s2, i32 0, i32 %b, i32 0, i32 %c
%0 = load double* %arrayidx1, align 1
ret double %0
}
@@ -219,7 +219,7 @@ entry:
; MIPS64R6-NOT: suxc1
%0 = load double* @gd, align 8
- %arrayidx1 = getelementptr inbounds [4 x %struct.S2]* @s2, i32 0, i32 %b, i32 0, i32 %c
+ %arrayidx1 = getelementptr inbounds [4 x %struct.S2], [4 x %struct.S2]* @s2, i32 0, i32 %b, i32 0, i32 %c
store double %0, double* %arrayidx1, align 1
ret void
}
diff --git a/test/CodeGen/Mips/fp-spill-reload.ll b/test/CodeGen/Mips/fp-spill-reload.ll
index f9887a55827..418a74cd65a 100644
--- a/test/CodeGen/Mips/fp-spill-reload.ll
+++ b/test/CodeGen/Mips/fp-spill-reload.ll
@@ -6,25 +6,25 @@ entry:
; CHECK: sw $fp
; CHECK: lw $fp
%0 = load i32* %b, align 4
- %arrayidx.1 = getelementptr inbounds i32* %b, i32 1
+ %arrayidx.1 = getelementptr inbounds i32, i32* %b, i32 1
%1 = load i32* %arrayidx.1, align 4
%add.1 = add nsw i32 %1, 1
- %arrayidx.2 = getelementptr inbounds i32* %b, i32 2
+ %arrayidx.2 = getelementptr inbounds i32, i32* %b, i32 2
%2 = load i32* %arrayidx.2, align 4
%add.2 = add nsw i32 %2, 2
- %arrayidx.3 = getelementptr inbounds i32* %b, i32 3
+ %arrayidx.3 = getelementptr inbounds i32, i32* %b, i32 3
%3 = load i32* %arrayidx.3, align 4
%add.3 = add nsw i32 %3, 3
- %arrayidx.4 = getelementptr inbounds i32* %b, i32 4
+ %arrayidx.4 = getelementptr inbounds i32, i32* %b, i32 4
%4 = load i32* %arrayidx.4, align 4
%add.4 = add nsw i32 %4, 4
- %arrayidx.5 = getelementptr inbounds i32* %b, i32 5
+ %arrayidx.5 = getelementptr inbounds i32, i32* %b, i32 5
%5 = load i32* %arrayidx.5, align 4
%add.5 = add nsw i32 %5, 5
- %arrayidx.6 = getelementptr inbounds i32* %b, i32 6
+ %arrayidx.6 = getelementptr inbounds i32, i32* %b, i32 6
%6 = load i32* %arrayidx.6, align 4
%add.6 = add nsw i32 %6, 6
- %arrayidx.7 = getelementptr inbounds i32* %b, i32 7
+ %arrayidx.7 = getelementptr inbounds i32, i32* %b, i32 7
%7 = load i32* %arrayidx.7, align 4
%add.7 = add nsw i32 %7, 7
call void @foo2(i32 %0, i32 %add.1, i32 %add.2, i32 %add.3, i32 %add.4, i32 %add.5, i32 %add.6, i32 %add.7) nounwind
diff --git a/test/CodeGen/Mips/hfptrcall.ll b/test/CodeGen/Mips/hfptrcall.ll
index 683952d0e4e..fd0e3593073 100644
--- a/test/CodeGen/Mips/hfptrcall.ll
+++ b/test/CodeGen/Mips/hfptrcall.ll
@@ -34,8 +34,8 @@ entry:
define { float, float } @scv() #0 {
entry:
%retval = alloca { float, float }, align 4
- %real = getelementptr inbounds { float, float }* %retval, i32 0, i32 0
- %imag = getelementptr inbounds { float, float }* %retval, i32 0, i32 1
+ %real = getelementptr inbounds { float, float }, { float, float }* %retval, i32 0, i32 0
+ %imag = getelementptr inbounds { float, float }, { float, float }* %retval, i32 0, i32 1
store float 5.000000e+00, float* %real
store float 9.900000e+01, float* %imag
%0 = load { float, float }* %retval
@@ -50,8 +50,8 @@ entry:
define { double, double } @dcv() #0 {
entry:
%retval = alloca { double, double }, align 8
- %real = getelementptr inbounds { double, double }* %retval, i32 0, i32 0
- %imag = getelementptr inbounds { double, double }* %retval, i32 0, i32 1
+ %real = getelementptr inbounds { double, double }, { double, double }* %retval, i32 0, i32 0
+ %imag = getelementptr inbounds { double, double }, { double, double }* %retval, i32 0, i32 1
store double 0x416BC8B0A0000000, double* %real
store double 0x41CDCCB763800000, double* %imag
%0 = load { double, double }* %retval
diff --git a/test/CodeGen/Mips/largeimm1.ll b/test/CodeGen/Mips/largeimm1.ll
index 1c0f69c5901..06c4d6bd960 100644
--- a/test/CodeGen/Mips/largeimm1.ll
+++ b/test/CodeGen/Mips/largeimm1.ll
@@ -5,7 +5,7 @@
define void @f() nounwind {
entry:
%a1 = alloca [1073741824 x i8], align 1
- %arrayidx = getelementptr inbounds [1073741824 x i8]* %a1, i32 0, i32 1048676
+ %arrayidx = getelementptr inbounds [1073741824 x i8], [1073741824 x i8]* %a1, i32 0, i32 1048676
call void @f2(i8* %arrayidx) nounwind
ret void
}
diff --git a/test/CodeGen/Mips/largeimmprinting.ll b/test/CodeGen/Mips/largeimmprinting.ll
index 918dfeee81a..a7c596672bb 100644
--- a/test/CodeGen/Mips/largeimmprinting.ll
+++ b/test/CodeGen/Mips/largeimmprinting.ll
@@ -27,7 +27,7 @@ entry:
; 64: sd $ra, 24($[[R1]])
%agg.tmp = alloca %struct.S1, align 1
- %tmp = getelementptr inbounds %struct.S1* %agg.tmp, i32 0, i32 0, i32 0
+ %tmp = getelementptr inbounds %struct.S1, %struct.S1* %agg.tmp, i32 0, i32 0, i32 0
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp, i8* getelementptr inbounds (%struct.S1* @s1, i32 0, i32 0, i32 0), i32 65536, i32 1, i1 false)
call void @f2(%struct.S1* byval %agg.tmp) nounwind
ret void
diff --git a/test/CodeGen/Mips/memcpy.ll b/test/CodeGen/Mips/memcpy.ll
index 39764a93638..83a41620f29 100644
--- a/test/CodeGen/Mips/memcpy.ll
+++ b/test/CodeGen/Mips/memcpy.ll
@@ -8,9 +8,9 @@ define void @foo1(%struct.S1* %s1, i8 signext %n) nounwind {
entry:
; CHECK-NOT: call16(memcpy
- %arraydecay = getelementptr inbounds %struct.S1* %s1, i32 0, i32 1, i32 0
+ %arraydecay = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 1, i32 0
tail call void @llvm.memcpy.p0i8.p0i8.i32(i8* %arraydecay, i8* getelementptr inbounds ([31 x i8]* @.str, i32 0, i32 0), i32 31, i32 1, i1 false)
- %arrayidx = getelementptr inbounds %struct.S1* %s1, i32 0, i32 1, i32 40
+ %arrayidx = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 1, i32 40
store i8 %n, i8* %arrayidx, align 1
ret void
}
diff --git a/test/CodeGen/Mips/micromips-delay-slot-jr.ll b/test/CodeGen/Mips/micromips-delay-slot-jr.ll
index 09a98c2a7d1..c01e6704f35 100644
--- a/test/CodeGen/Mips/micromips-delay-slot-jr.ll
+++ b/test/CodeGen/Mips/micromips-delay-slot-jr.ll
@@ -13,7 +13,7 @@ L1: ; preds = %entry, %L1
%i.0 = phi i32 [ 0, %entry ], [ %inc, %L1 ]
%puts = tail call i32 @puts(i8* getelementptr inbounds ([2 x i8]* @str, i32 0, i32 0))
%inc = add i32 %i.0, 1
- %arrayidx = getelementptr inbounds [3 x i8*]* @main.L, i32 0, i32 %i.0
+ %arrayidx = getelementptr inbounds [3 x i8*], [3 x i8*]* @main.L, i32 0, i32 %i.0
%0 = load i8** %arrayidx, align 4, !tbaa !1
indirectbr i8* %0, [label %L1, label %L2]
@@ -36,7 +36,7 @@ declare i32 @puts(i8* nocapture readonly) #1
@bar_ary = common global [4 x %struct.barstruct] zeroinitializer, align 4
define float* @spooky(i32 signext %i) #0 {
- %safe = getelementptr inbounds [4 x %struct.barstruct]* @bar_ary, i32 0, i32 %i, i32 1
+ %safe = getelementptr inbounds [4 x %struct.barstruct], [4 x %struct.barstruct]* @bar_ary, i32 0, i32 %i, i32 1
store float 1.420000e+02, float* %safe, align 4, !tbaa !1
ret float* %safe
}
diff --git a/test/CodeGen/Mips/micromips-sw-lw-16.ll b/test/CodeGen/Mips/micromips-sw-lw-16.ll
index bc095546ceb..7ea4413afa1 100644
--- a/test/CodeGen/Mips/micromips-sw-lw-16.ll
+++ b/test/CodeGen/Mips/micromips-sw-lw-16.ll
@@ -12,11 +12,11 @@ entry:
%2 = load i32** %p.addr, align 4
store i32 %add, i32* %2, align 4
%3 = load i32** %p.addr, align 4
- %add.ptr = getelementptr inbounds i32* %3, i32 1
+ %add.ptr = getelementptr inbounds i32, i32* %3, i32 1
%4 = load i32* %add.ptr, align 4
%add1 = add nsw i32 7, %4
%5 = load i32** %p.addr, align 4
- %add.ptr2 = getelementptr inbounds i32* %5, i32 1
+ %add.ptr2 = getelementptr inbounds i32, i32* %5, i32 1
store i32 %add1, i32* %add.ptr2, align 4
ret void
}
diff --git a/test/CodeGen/Mips/mips16_fpret.ll b/test/CodeGen/Mips/mips16_fpret.ll
index fe87604d610..635b28d81a7 100644
--- a/test/CodeGen/Mips/mips16_fpret.ll
+++ b/test/CodeGen/Mips/mips16_fpret.ll
@@ -36,8 +36,8 @@ entry:
%retval = alloca { float, float }, align 4
%cx.real = load float* getelementptr inbounds ({ float, float }* @cx, i32 0, i32 0)
%cx.imag = load float* getelementptr inbounds ({ float, float }* @cx, i32 0, i32 1)
- %real = getelementptr inbounds { float, float }* %retval, i32 0, i32 0
- %imag = getelementptr inbounds { float, float }* %retval, i32 0, i32 1
+ %real = getelementptr inbounds { float, float }, { float, float }* %retval, i32 0, i32 0
+ %imag = getelementptr inbounds { float, float }, { float, float }* %retval, i32 0, i32 1
store float %cx.real, float* %real
store float %cx.imag, float* %imag
%0 = load { float, float }* %retval
@@ -55,8 +55,8 @@ entry:
%retval = alloca { double, double }, align 8
%dcx.real = load double* getelementptr inbounds ({ double, double }* @dcx, i32 0, i32 0)
%dcx.imag = load double* getelementptr inbounds ({ double, double }* @dcx, i32 0, i32 1)
- %real = getelementptr inbounds { double, double }* %retval, i32 0, i32 0
- %imag = getelementptr inbounds { double, double }* %retval, i32 0, i32 1
+ %real = getelementptr inbounds { double, double }, { double, double }* %retval, i32 0, i32 0
+ %imag = getelementptr inbounds { double, double }, { double, double }* %retval, i32 0, i32 1
store double %dcx.real, double* %real
store double %dcx.imag, double* %imag
%0 = load { double, double }* %retval
diff --git a/test/CodeGen/Mips/misha.ll b/test/CodeGen/Mips/misha.ll
index 65d3b7b5d87..3000b5c6a79 100644
--- a/test/CodeGen/Mips/misha.ll
+++ b/test/CodeGen/Mips/misha.ll
@@ -15,7 +15,7 @@ for.body: ; preds = %for.body.lr.ph, %fo
%1 = phi i8 [ %.pre, %for.body.lr.ph ], [ %conv4, %for.body ]
%i.010 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.body ]
%from.addr.09 = phi i8* [ %from, %for.body.lr.ph ], [ %incdec.ptr, %for.body ]
- %incdec.ptr = getelementptr inbounds i8* %from.addr.09, i32 1
+ %incdec.ptr = getelementptr inbounds i8, i8* %from.addr.09, i32 1
%2 = load i8* %from.addr.09, align 1
%conv27 = zext i8 %2 to i32
%conv36 = zext i8 %1 to i32
@@ -51,7 +51,7 @@ for.body: ; preds = %for.body.lr.ph, %fo
%1 = phi i16 [ %.pre, %for.body.lr.ph ], [ %conv4, %for.body ]
%i.010 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.body ]
%from.addr.09 = phi i16* [ %from, %for.body.lr.ph ], [ %incdec.ptr, %for.body ]
- %incdec.ptr = getelementptr inbounds i16* %from.addr.09, i32 1
+ %incdec.ptr = getelementptr inbounds i16, i16* %from.addr.09, i32 1
%2 = load i16* %from.addr.09, align 2
%conv27 = zext i16 %2 to i32
%conv36 = zext i16 %1 to i32
diff --git a/test/CodeGen/Mips/mno-ldc1-sdc1.ll b/test/CodeGen/Mips/mno-ldc1-sdc1.ll
index db653eadf2f..f42850fb8ad 100644
--- a/test/CodeGen/Mips/mno-ldc1-sdc1.ll
+++ b/test/CodeGen/Mips/mno-ldc1-sdc1.ll
@@ -212,7 +212,7 @@ entry:
define double @test_ldxc1(double* nocapture readonly %a, i32 %i) {
entry:
- %arrayidx = getelementptr inbounds double* %a, i32 %i
+ %arrayidx = getelementptr inbounds double, double* %a, i32 %i
%0 = load double* %arrayidx, align 8
ret double %0
}
@@ -243,7 +243,7 @@ entry:
define void @test_sdxc1(double %b, double* nocapture %a, i32 %i) {
entry:
- %arrayidx = getelementptr inbounds double* %a, i32 %i
+ %arrayidx = getelementptr inbounds double, double* %a, i32 %i
store double %b, double* %arrayidx, align 8
ret void
}
diff --git a/test/CodeGen/Mips/msa/frameindex.ll b/test/CodeGen/Mips/msa/frameindex.ll
index ebec465a3e3..3c0119008ce 100644
--- a/test/CodeGen/Mips/msa/frameindex.ll
+++ b/test/CodeGen/Mips/msa/frameindex.ll
@@ -102,9 +102,9 @@ define void @loadstore_v8i16_unaligned() nounwind {
%1 = alloca [2 x <8 x i16>]
%2 = bitcast [2 x <8 x i16>]* %1 to i8*
- %3 = getelementptr i8* %2, i32 1
+ %3 = getelementptr i8, i8* %2, i32 1
%4 = bitcast i8* %3 to [2 x <8 x i16>]*
- %5 = getelementptr [2 x <8 x i16>]* %4, i32 0, i32 0
+ %5 = getelementptr [2 x <8 x i16>], [2 x <8 x i16>]* %4, i32 0, i32 0
%6 = load volatile <8 x i16>* %5
; MIPS32-AE: addiu [[BASE:\$([0-9]+|gp)]], $sp, 1
@@ -205,9 +205,9 @@ define void @loadstore_v4i32_unaligned() nounwind {
%1 = alloca [2 x <4 x i32>]
%2 = bitcast [2 x <4 x i32>]* %1 to i8*
- %3 = getelementptr i8* %2, i32 1
+ %3 = getelementptr i8, i8* %2, i32 1
%4 = bitcast i8* %3 to [2 x <4 x i32>]*
- %5 = getelementptr [2 x <4 x i32>]* %4, i32 0, i32 0
+ %5 = getelementptr [2 x <4 x i32>], [2 x <4 x i32>]* %4, i32 0, i32 0
%6 = load volatile <4 x i32>* %5
; MIPS32-AE: addiu [[BASE:\$([0-9]+|gp)]], $sp, 1
@@ -308,9 +308,9 @@ define void @loadstore_v2i64_unaligned() nounwind {
%1 = alloca [2 x <2 x i64>]
%2 = bitcast [2 x <2 x i64>]* %1 to i8*
- %3 = getelementptr i8* %2, i32 1
+ %3 = getelementptr i8, i8* %2, i32 1
%4 = bitcast i8* %3 to [2 x <2 x i64>]*
- %5 = getelementptr [2 x <2 x i64>]* %4, i32 0, i32 0
+ %5 = getelementptr [2 x <2 x i64>], [2 x <2 x i64>]* %4, i32 0, i32 0
%6 = load volatile <2 x i64>* %5
; MIPS32-AE: addiu [[BASE:\$([0-9]+|gp)]], $sp, 1
diff --git a/test/CodeGen/Mips/msa/spill.ll b/test/CodeGen/Mips/msa/spill.ll
index 66f896ac468..085a16e80ae 100644
--- a/test/CodeGen/Mips/msa/spill.ll
+++ b/test/CodeGen/Mips/msa/spill.ll
@@ -6,39 +6,39 @@
define i32 @test_i8(<16 x i8>* %p0, <16 x i8>* %q1) nounwind {
entry:
- %p1 = getelementptr <16 x i8>* %p0, i32 1
- %p2 = getelementptr <16 x i8>* %p0, i32 2
- %p3 = getelementptr <16 x i8>* %p0, i32 3
- %p4 = getelementptr <16 x i8>* %p0, i32 4
- %p5 = getelementptr <16 x i8>* %p0, i32 5
- %p6 = getelementptr <16 x i8>* %p0, i32 6
- %p7 = getelementptr <16 x i8>* %p0, i32 7
- %p8 = getelementptr <16 x i8>* %p0, i32 8
- %p9 = getelementptr <16 x i8>* %p0, i32 9
- %p10 = getelementptr <16 x i8>* %p0, i32 10
- %p11 = getelementptr <16 x i8>* %p0, i32 11
- %p12 = getelementptr <16 x i8>* %p0, i32 12
- %p13 = getelementptr <16 x i8>* %p0, i32 13
- %p14 = getelementptr <16 x i8>* %p0, i32 14
- %p15 = getelementptr <16 x i8>* %p0, i32 15
- %p16 = getelementptr <16 x i8>* %p0, i32 16
- %p17 = getelementptr <16 x i8>* %p0, i32 17
- %p18 = getelementptr <16 x i8>* %p0, i32 18
- %p19 = getelementptr <16 x i8>* %p0, i32 19
- %p20 = getelementptr <16 x i8>* %p0, i32 20
- %p21 = getelementptr <16 x i8>* %p0, i32 21
- %p22 = getelementptr <16 x i8>* %p0, i32 22
- %p23 = getelementptr <16 x i8>* %p0, i32 23
- %p24 = getelementptr <16 x i8>* %p0, i32 24
- %p25 = getelementptr <16 x i8>* %p0, i32 25
- %p26 = getelementptr <16 x i8>* %p0, i32 26
- %p27 = getelementptr <16 x i8>* %p0, i32 27
- %p28 = getelementptr <16 x i8>* %p0, i32 28
- %p29 = getelementptr <16 x i8>* %p0, i32 29
- %p30 = getelementptr <16 x i8>* %p0, i32 30
- %p31 = getelementptr <16 x i8>* %p0, i32 31
- %p32 = getelementptr <16 x i8>* %p0, i32 32
- %p33 = getelementptr <16 x i8>* %p0, i32 33
+ %p1 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 1
+ %p2 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 2
+ %p3 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 3
+ %p4 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 4
+ %p5 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 5
+ %p6 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 6
+ %p7 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 7
+ %p8 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 8
+ %p9 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 9
+ %p10 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 10
+ %p11 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 11
+ %p12 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 12
+ %p13 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 13
+ %p14 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 14
+ %p15 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 15
+ %p16 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 16
+ %p17 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 17
+ %p18 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 18
+ %p19 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 19
+ %p20 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 20
+ %p21 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 21
+ %p22 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 22
+ %p23 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 23
+ %p24 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 24
+ %p25 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 25
+ %p26 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 26
+ %p27 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 27
+ %p28 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 28
+ %p29 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 29
+ %p30 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 30
+ %p31 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 31
+ %p32 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 32
+ %p33 = getelementptr <16 x i8>, <16 x i8>* %p0, i32 33
%0 = load <16 x i8>* %p0, align 16
%1 = load <16 x i8>* %p1, align 16
%2 = load <16 x i8>* %p2, align 16
@@ -155,39 +155,39 @@ declare i32 @llvm.mips.copy.s.b(<16 x i8>, i32) nounwind
define i32 @test_i16(<8 x i16>* %p0, <8 x i16>* %q1) nounwind {
entry:
- %p1 = getelementptr <8 x i16>* %p0, i32 1
- %p2 = getelementptr <8 x i16>* %p0, i32 2
- %p3 = getelementptr <8 x i16>* %p0, i32 3
- %p4 = getelementptr <8 x i16>* %p0, i32 4
- %p5 = getelementptr <8 x i16>* %p0, i32 5
- %p6 = getelementptr <8 x i16>* %p0, i32 6
- %p7 = getelementptr <8 x i16>* %p0, i32 7
- %p8 = getelementptr <8 x i16>* %p0, i32 8
- %p9 = getelementptr <8 x i16>* %p0, i32 9
- %p10 = getelementptr <8 x i16>* %p0, i32 10
- %p11 = getelementptr <8 x i16>* %p0, i32 11
- %p12 = getelementptr <8 x i16>* %p0, i32 12
- %p13 = getelementptr <8 x i16>* %p0, i32 13
- %p14 = getelementptr <8 x i16>* %p0, i32 14
- %p15 = getelementptr <8 x i16>* %p0, i32 15
- %p16 = getelementptr <8 x i16>* %p0, i32 16
- %p17 = getelementptr <8 x i16>* %p0, i32 17
- %p18 = getelementptr <8 x i16>* %p0, i32 18
- %p19 = getelementptr <8 x i16>* %p0, i32 19
- %p20 = getelementptr <8 x i16>* %p0, i32 20
- %p21 = getelementptr <8 x i16>* %p0, i32 21
- %p22 = getelementptr <8 x i16>* %p0, i32 22
- %p23 = getelementptr <8 x i16>* %p0, i32 23
- %p24 = getelementptr <8 x i16>* %p0, i32 24
- %p25 = getelementptr <8 x i16>* %p0, i32 25
- %p26 = getelementptr <8 x i16>* %p0, i32 26
- %p27 = getelementptr <8 x i16>* %p0, i32 27
- %p28 = getelementptr <8 x i16>* %p0, i32 28
- %p29 = getelementptr <8 x i16>* %p0, i32 29
- %p30 = getelementptr <8 x i16>* %p0, i32 30
- %p31 = getelementptr <8 x i16>* %p0, i32 31
- %p32 = getelementptr <8 x i16>* %p0, i32 32
- %p33 = getelementptr <8 x i16>* %p0, i32 33
+ %p1 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 1
+ %p2 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 2
+ %p3 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 3
+ %p4 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 4
+ %p5 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 5
+ %p6 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 6
+ %p7 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 7
+ %p8 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 8
+ %p9 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 9
+ %p10 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 10
+ %p11 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 11
+ %p12 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 12
+ %p13 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 13
+ %p14 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 14
+ %p15 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 15
+ %p16 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 16
+ %p17 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 17
+ %p18 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 18
+ %p19 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 19
+ %p20 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 20
+ %p21 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 21
+ %p22 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 22
+ %p23 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 23
+ %p24 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 24
+ %p25 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 25
+ %p26 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 26
+ %p27 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 27
+ %p28 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 28
+ %p29 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 29
+ %p30 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 30
+ %p31 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 31
+ %p32 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 32
+ %p33 = getelementptr <8 x i16>, <8 x i16>* %p0, i32 33
%0 = load <8 x i16>* %p0, align 16
%1 = load <8 x i16>* %p1, align 16
%2 = load <8 x i16>* %p2, align 16
@@ -304,39 +304,39 @@ declare i32 @llvm.mips.copy.s.h(<8 x i16>, i32) nounwind
define i32 @test_i32(<4 x i32>* %p0, <4 x i32>* %q1) nounwind {
entry:
- %p1 = getelementptr <4 x i32>* %p0, i32 1
- %p2 = getelementptr <4 x i32>* %p0, i32 2
- %p3 = getelementptr <4 x i32>* %p0, i32 3
- %p4 = getelementptr <4 x i32>* %p0, i32 4
- %p5 = getelementptr <4 x i32>* %p0, i32 5
- %p6 = getelementptr <4 x i32>* %p0, i32 6
- %p7 = getelementptr <4 x i32>* %p0, i32 7
- %p8 = getelementptr <4 x i32>* %p0, i32 8
- %p9 = getelementptr <4 x i32>* %p0, i32 9
- %p10 = getelementptr <4 x i32>* %p0, i32 10
- %p11 = getelementptr <4 x i32>* %p0, i32 11
- %p12 = getelementptr <4 x i32>* %p0, i32 12
- %p13 = getelementptr <4 x i32>* %p0, i32 13
- %p14 = getelementptr <4 x i32>* %p0, i32 14
- %p15 = getelementptr <4 x i32>* %p0, i32 15
- %p16 = getelementptr <4 x i32>* %p0, i32 16
- %p17 = getelementptr <4 x i32>* %p0, i32 17
- %p18 = getelementptr <4 x i32>* %p0, i32 18
- %p19 = getelementptr <4 x i32>* %p0, i32 19
- %p20 = getelementptr <4 x i32>* %p0, i32 20
- %p21 = getelementptr <4 x i32>* %p0, i32 21
- %p22 = getelementptr <4 x i32>* %p0, i32 22
- %p23 = getelementptr <4 x i32>* %p0, i32 23
- %p24 = getelementptr <4 x i32>* %p0, i32 24
- %p25 = getelementptr <4 x i32>* %p0, i32 25
- %p26 = getelementptr <4 x i32>* %p0, i32 26
- %p27 = getelementptr <4 x i32>* %p0, i32 27
- %p28 = getelementptr <4 x i32>* %p0, i32 28
- %p29 = getelementptr <4 x i32>* %p0, i32 29
- %p30 = getelementptr <4 x i32>* %p0, i32 30
- %p31 = getelementptr <4 x i32>* %p0, i32 31
- %p32 = getelementptr <4 x i32>* %p0, i32 32
- %p33 = getelementptr <4 x i32>* %p0, i32 33
+ %p1 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 1
+ %p2 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 2
+ %p3 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 3
+ %p4 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 4
+ %p5 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 5
+ %p6 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 6
+ %p7 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 7
+ %p8 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 8
+ %p9 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 9
+ %p10 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 10
+ %p11 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 11
+ %p12 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 12
+ %p13 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 13
+ %p14 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 14
+ %p15 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 15
+ %p16 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 16
+ %p17 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 17
+ %p18 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 18
+ %p19 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 19
+ %p20 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 20
+ %p21 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 21
+ %p22 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 22
+ %p23 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 23
+ %p24 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 24
+ %p25 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 25
+ %p26 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 26
+ %p27 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 27
+ %p28 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 28
+ %p29 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 29
+ %p30 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 30
+ %p31 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 31
+ %p32 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 32
+ %p33 = getelementptr <4 x i32>, <4 x i32>* %p0, i32 33
%0 = load <4 x i32>* %p0, align 16
%1 = load <4 x i32>* %p1, align 16
%2 = load <4 x i32>* %p2, align 16
@@ -453,39 +453,39 @@ declare i32 @llvm.mips.copy.s.w(<4 x i32>, i32) nounwind
define i32 @test_i64(<2 x i64>* %p0, <2 x i64>* %q1) nounwind {
entry:
- %p1 = getelementptr <2 x i64>* %p0, i32 1
- %p2 = getelementptr <2 x i64>* %p0, i32 2
- %p3 = getelementptr <2 x i64>* %p0, i32 3
- %p4 = getelementptr <2 x i64>* %p0, i32 4
- %p5 = getelementptr <2 x i64>* %p0, i32 5
- %p6 = getelementptr <2 x i64>* %p0, i32 6
- %p7 = getelementptr <2 x i64>* %p0, i32 7
- %p8 = getelementptr <2 x i64>* %p0, i32 8
- %p9 = getelementptr <2 x i64>* %p0, i32 9
- %p10 = getelementptr <2 x i64>* %p0, i32 10
- %p11 = getelementptr <2 x i64>* %p0, i32 11
- %p12 = getelementptr <2 x i64>* %p0, i32 12
- %p13 = getelementptr <2 x i64>* %p0, i32 13
- %p14 = getelementptr <2 x i64>* %p0, i32 14
- %p15 = getelementptr <2 x i64>* %p0, i32 15
- %p16 = getelementptr <2 x i64>* %p0, i32 16
- %p17 = getelementptr <2 x i64>* %p0, i32 17
- %p18 = getelementptr <2 x i64>* %p0, i32 18
- %p19 = getelementptr <2 x i64>* %p0, i32 19
- %p20 = getelementptr <2 x i64>* %p0, i32 20
- %p21 = getelementptr <2 x i64>* %p0, i32 21
- %p22 = getelementptr <2 x i64>* %p0, i32 22
- %p23 = getelementptr <2 x i64>* %p0, i32 23
- %p24 = getelementptr <2 x i64>* %p0, i32 24
- %p25 = getelementptr <2 x i64>* %p0, i32 25
- %p26 = getelementptr <2 x i64>* %p0, i32 26
- %p27 = getelementptr <2 x i64>* %p0, i32 27
- %p28 = getelementptr <2 x i64>* %p0, i32 28
- %p29 = getelementptr <2 x i64>* %p0, i32 29
- %p30 = getelementptr <2 x i64>* %p0, i32 30
- %p31 = getelementptr <2 x i64>* %p0, i32 31
- %p32 = getelementptr <2 x i64>* %p0, i32 32
- %p33 = getelementptr <2 x i64>* %p0, i32 33
+ %p1 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 1
+ %p2 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 2
+ %p3 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 3
+ %p4 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 4
+ %p5 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 5
+ %p6 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 6
+ %p7 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 7
+ %p8 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 8
+ %p9 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 9
+ %p10 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 10
+ %p11 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 11
+ %p12 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 12
+ %p13 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 13
+ %p14 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 14
+ %p15 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 15
+ %p16 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 16
+ %p17 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 17
+ %p18 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 18
+ %p19 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 19
+ %p20 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 20
+ %p21 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 21
+ %p22 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 22
+ %p23 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 23
+ %p24 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 24
+ %p25 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 25
+ %p26 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 26
+ %p27 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 27
+ %p28 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 28
+ %p29 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 29
+ %p30 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 30
+ %p31 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 31
+ %p32 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 32
+ %p33 = getelementptr <2 x i64>, <2 x i64>* %p0, i32 33
%0 = load <2 x i64>* %p0, align 16
%1 = load <2 x i64>* %p1, align 16
%2 = load <2 x i64>* %p2, align 16
diff --git a/test/CodeGen/Mips/nacl-align.ll b/test/CodeGen/Mips/nacl-align.ll
index e61b8347760..892a7edd17c 100644
--- a/test/CodeGen/Mips/nacl-align.ll
+++ b/test/CodeGen/Mips/nacl-align.ll
@@ -67,7 +67,7 @@ default:
define i32 @test2(i32 %i) {
entry:
- %elementptr = getelementptr inbounds [2 x i8*]* @bb_array, i32 0, i32 %i
+ %elementptr = getelementptr inbounds [2 x i8*], [2 x i8*]* @bb_array, i32 0, i32 %i
%0 = load i8** %elementptr, align 4
indirectbr i8* %0, [label %bb1, label %bb2]
diff --git a/test/CodeGen/Mips/o32_cc_byval.ll b/test/CodeGen/Mips/o32_cc_byval.ll
index 5db47acc5a8..dde5caa75d0 100644
--- a/test/CodeGen/Mips/o32_cc_byval.ll
+++ b/test/CodeGen/Mips/o32_cc_byval.ll
@@ -30,7 +30,7 @@ entry:
%agg.tmp10 = alloca %struct.S3, align 4
call void @callee1(float 2.000000e+01, %struct.S1* byval bitcast (%0* @f1.s1 to %struct.S1*)) nounwind
call void @callee2(%struct.S2* byval @f1.s2) nounwind
- %tmp11 = getelementptr inbounds %struct.S3* %agg.tmp10, i32 0, i32 0
+ %tmp11 = getelementptr inbounds %struct.S3, %struct.S3* %agg.tmp10, i32 0, i32 0
store i8 11, i8* %tmp11, align 4
call void @callee3(float 2.100000e+01, %struct.S3* byval %agg.tmp10, %struct.S1* byval bitcast (%0* @f1.s1 to %struct.S1*)) nounwind
ret void
@@ -61,17 +61,17 @@ entry:
; CHECK: sw $[[R3]], 16($sp)
; CHECK: mfc1 $6, $f[[F0]]
- %i2 = getelementptr inbounds %struct.S1* %s1, i32 0, i32 5
+ %i2 = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 5
%tmp = load i32* %i2, align 4
- %d = getelementptr inbounds %struct.S1* %s1, i32 0, i32 4
+ %d = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 4
%tmp1 = load double* %d, align 8
- %ll = getelementptr inbounds %struct.S1* %s1, i32 0, i32 3
+ %ll = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 3
%tmp2 = load i64* %ll, align 8
- %i = getelementptr inbounds %struct.S1* %s1, i32 0, i32 2
+ %i = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 2
%tmp3 = load i32* %i, align 4
- %s = getelementptr inbounds %struct.S1* %s1, i32 0, i32 1
+ %s = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 1
%tmp4 = load i16* %s, align 2
- %c = getelementptr inbounds %struct.S1* %s1, i32 0, i32 0
+ %c = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 0
%tmp5 = load i8* %c, align 1
tail call void @callee4(i32 %tmp, double %tmp1, i64 %tmp2, i32 %tmp3, i16 signext %tmp4, i8 signext %tmp5, float %f) nounwind
ret void
@@ -90,9 +90,9 @@ entry:
; CHECK: lw $[[R0:[0-9]+]], 60($sp)
; CHECK: sw $[[R0]], 24($sp)
- %arrayidx = getelementptr inbounds %struct.S2* %s2, i32 0, i32 0, i32 0
+ %arrayidx = getelementptr inbounds %struct.S2, %struct.S2* %s2, i32 0, i32 0, i32 0
%tmp = load i32* %arrayidx, align 4
- %arrayidx2 = getelementptr inbounds %struct.S2* %s2, i32 0, i32 0, i32 3
+ %arrayidx2 = getelementptr inbounds %struct.S2, %struct.S2* %s2, i32 0, i32 0, i32 3
%tmp3 = load i32* %arrayidx2, align 4
tail call void @callee4(i32 %tmp, double 2.000000e+00, i64 3, i32 %tmp3, i16 signext 4, i8 signext 5, float 6.000000e+00) nounwind
ret void
@@ -110,11 +110,11 @@ entry:
; CHECK: sw $[[R0]], 32($sp)
; CHECK: sw $[[R1]], 24($sp)
- %i = getelementptr inbounds %struct.S1* %s1, i32 0, i32 2
+ %i = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 2
%tmp = load i32* %i, align 4
- %i2 = getelementptr inbounds %struct.S1* %s1, i32 0, i32 5
+ %i2 = getelementptr inbounds %struct.S1, %struct.S1* %s1, i32 0, i32 5
%tmp1 = load i32* %i2, align 4
- %c = getelementptr inbounds %struct.S3* %s3, i32 0, i32 0
+ %c = getelementptr inbounds %struct.S3, %struct.S3* %s3, i32 0, i32 0
%tmp2 = load i8* %c, align 1
tail call void @callee4(i32 %tmp, double 2.000000e+00, i64 3, i32 %tmp1, i16 signext 4, i8 signext %tmp2, float 6.000000e+00) nounwind
ret void
diff --git a/test/CodeGen/Mips/prevent-hoisting.ll b/test/CodeGen/Mips/prevent-hoisting.ll
index 210fe3b0f6d..3d902431a00 100644
--- a/test/CodeGen/Mips/prevent-hoisting.ll
+++ b/test/CodeGen/Mips/prevent-hoisting.ll
@@ -77,7 +77,7 @@ switch.lookup6: ; preds = %6
; <label>:9 ; preds = %8
%10 = and i32 %b8, 1
%11 = shl nuw nsw i32 %10, 3
- %12 = getelementptr inbounds %struct.Slice* null, i32 0, i32 9
+ %12 = getelementptr inbounds %struct.Slice, %struct.Slice* null, i32 0, i32 9
br i1 undef, label %.preheader, label %.preheader11
.preheader11: ; preds = %21, %9
@@ -92,9 +92,9 @@ switch.lookup6: ; preds = %6
br label %15
; <label>:15 ; preds = %14, %13
- %16 = getelementptr inbounds [0 x [20 x i32]]* @assignSE2partition, i32 0, i32 %1, i32 undef
+ %16 = getelementptr inbounds [0 x [20 x i32]], [0 x [20 x i32]]* @assignSE2partition, i32 0, i32 %1, i32 undef
%17 = load i32* %16, align 4
- %18 = getelementptr inbounds %struct.datapartition* null, i32 %17, i32 2
+ %18 = getelementptr inbounds %struct.datapartition, %struct.datapartition* null, i32 %17, i32 2
%19 = load i32 (%struct.syntaxelement*, %struct.img_par*, %struct.datapartition*)** %18, align 4
%20 = call i32 %19(%struct.syntaxelement* undef, %struct.img_par* %img, %struct.datapartition* undef)
br i1 false, label %.loopexit, label %21
@@ -102,9 +102,9 @@ switch.lookup6: ; preds = %6
; <label>:21 ; preds = %15
%22 = add i32 %coef_ctr.013, 1
%23 = add i32 %22, 0
- %24 = getelementptr inbounds [2 x i8]* %7, i32 %23, i32 0
+ %24 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i32 %23, i32 0
%25 = add nsw i32 0, %11
- %26 = getelementptr inbounds %struct.img_par* %img, i32 0, i32 27, i32 undef, i32 %25
+ %26 = getelementptr inbounds %struct.img_par, %struct.img_par* %img, i32 0, i32 27, i32 undef, i32 %25
store i32 0, i32* %26, align 4
%27 = add nsw i32 %k.014, 1
%28 = icmp slt i32 %27, 65
@@ -122,9 +122,9 @@ switch.lookup6: ; preds = %6
br label %31
; <label>:31 ; preds = %30, %29
- %32 = getelementptr inbounds [0 x [20 x i32]]* @assignSE2partition, i32 0, i32 %1, i32 undef
+ %32 = getelementptr inbounds [0 x [20 x i32]], [0 x [20 x i32]]* @assignSE2partition, i32 0, i32 %1, i32 undef
%33 = load i32* %32, align 4
- %34 = getelementptr inbounds %struct.datapartition* null, i32 %33
+ %34 = getelementptr inbounds %struct.datapartition, %struct.datapartition* null, i32 %33
%35 = call i32 undef(%struct.syntaxelement* undef, %struct.img_par* %img, %struct.datapartition* %34)
br i1 false, label %.loopexit, label %36
@@ -132,11 +132,11 @@ switch.lookup6: ; preds = %6
%37 = load i32* undef, align 4
%38 = add i32 %coef_ctr.29, 1
%39 = add i32 %38, %37
- %40 = getelementptr inbounds [2 x i8]* %7, i32 %39, i32 0
+ %40 = getelementptr inbounds [2 x i8], [2 x i8]* %7, i32 %39, i32 0
%41 = load i8* %40, align 1
%42 = zext i8 %41 to i32
%43 = add nsw i32 %42, %11
- %44 = getelementptr inbounds %struct.img_par* %img, i32 0, i32 27, i32 undef, i32 %43
+ %44 = getelementptr inbounds %struct.img_par, %struct.img_par* %img, i32 0, i32 27, i32 undef, i32 %43
store i32 0, i32* %44, align 4
%45 = add nsw i32 %k.110, 1
%46 = icmp slt i32 %45, 65
diff --git a/test/CodeGen/Mips/sr1.ll b/test/CodeGen/Mips/sr1.ll
index 610693d58b3..69655f7b842 100644
--- a/test/CodeGen/Mips/sr1.ll
+++ b/test/CodeGen/Mips/sr1.ll
@@ -8,9 +8,9 @@
define void @foo1() #0 {
entry:
%c = alloca [10 x i8], align 1
- %arraydecay = getelementptr inbounds [10 x i8]* %c, i32 0, i32 0
+ %arraydecay = getelementptr inbounds [10 x i8], [10 x i8]* %c, i32 0, i32 0
call void @x(i8* %arraydecay)
- %arraydecay1 = getelementptr inbounds [10 x i8]* %c, i32 0, i32 0
+ %arraydecay1 = getelementptr inbounds [10 x i8], [10 x i8]* %c, i32 0, i32 0
call void @x(i8* %arraydecay1)
ret void
; CHECK: .ent foo1
@@ -25,9 +25,9 @@ declare void @x(i8*) #1
define void @foo2() #0 {
entry:
%c = alloca [150 x i8], align 1
- %arraydecay = getelementptr inbounds [150 x i8]* %c, i32 0, i32 0
+ %arraydecay = getelementptr inbounds [150 x i8], [150 x i8]* %c, i32 0, i32 0
call void @x(i8* %arraydecay)
- %arraydecay1 = getelementptr inbounds [150 x i8]* %c, i32 0, i32 0
+ %arraydecay1 = getelementptr inbounds [150 x i8], [150 x i8]* %c, i32 0, i32 0
call void @x(i8* %arraydecay1)
ret void
; CHECK: .ent foo2
diff --git a/test/CodeGen/Mips/stackcoloring.ll b/test/CodeGen/Mips/stackcoloring.ll
index 4987dad5338..99d2b4a287e 100644
--- a/test/CodeGen/Mips/stackcoloring.ll
+++ b/test/CodeGen/Mips/stackcoloring.ll
@@ -12,14 +12,14 @@ entry:
%b = alloca [16 x i32], align 4
%0 = bitcast [16 x i32]* %b to i8*
call void @llvm.lifetime.start(i64 64, i8* %0)
- %arraydecay = getelementptr inbounds [16 x i32]* %b, i32 0, i32 0
+ %arraydecay = getelementptr inbounds [16 x i32], [16 x i32]* %b, i32 0, i32 0
br label %for.body
for.body: ; preds = %for.body, %entry
%i.05 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
%v.04 = phi i32 [ 0, %entry ], [ %add, %for.body ]
%1 = load i32** @g1, align 4
- %arrayidx = getelementptr inbounds i32* %1, i32 %i.05
+ %arrayidx = getelementptr inbounds i32, i32* %1, i32 %i.05
%2 = load i32* %arrayidx, align 4
%call = call i32 @foo2(i32 %2, i32* %arraydecay)
%add = add nsw i32 %call, %v.04
diff --git a/test/CodeGen/Mips/swzero.ll b/test/CodeGen/Mips/swzero.ll
index 9f91a3902d7..9aaee150980 100644
--- a/test/CodeGen/Mips/swzero.ll
+++ b/test/CodeGen/Mips/swzero.ll
@@ -6,7 +6,7 @@ define void @zero_u(%struct.unaligned* nocapture %p) nounwind {
entry:
; CHECK: swl $zero
; CHECK: swr $zero
- %x = getelementptr inbounds %struct.unaligned* %p, i32 0, i32 0
+ %x = getelementptr inbounds %struct.unaligned, %struct.unaligned* %p, i32 0, i32 0
store i32 0, i32* %x, align 1
ret void
}