diff options
Diffstat (limited to 'test/CodeGen/Mips/cconv')
18 files changed, 278 insertions, 198 deletions
diff --git a/test/CodeGen/Mips/cconv/arguments-float.ll b/test/CodeGen/Mips/cconv/arguments-float.ll index ee40d7f..156d6f1 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 1666974..fabc107 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 380bd5c..9f1fe91 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 3221e23..24148ed 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 583759a..26eb569 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-small-structures-bigger-than-32bits.ll b/test/CodeGen/Mips/cconv/arguments-small-structures-bigger-than-32bits.ll new file mode 100644 index 0000000..087a051 --- /dev/null +++ b/test/CodeGen/Mips/cconv/arguments-small-structures-bigger-than-32bits.ll @@ -0,0 +1,80 @@ +; RUN: llc < %s -march=mips64 -target-abi n64 -mcpu=mips64r2 | FileCheck %s -check-prefix=ALL -check-prefix=MIPSEB +; RUN: llc < %s -march=mips64el -target-abi n64 -mcpu=mips64r2 | FileCheck %s -check-prefix=ALL -check-prefix=MIPSEL +; RUN: llc < %s -march=mips64 -target-abi n32 -mcpu=mips64r2 | FileCheck %s -check-prefix=ALL -check-prefix=MIPSEB +; RUN: llc < %s -march=mips64el -target-abi n32 -mcpu=mips64r2 | FileCheck %s -check-prefix=ALL -check-prefix=MIPSEL + +; #include <stdio.h> +; +; struct S1 { +; char x1; +; short x2; +; char x3; +; }; +; +; struct S2 { +; char x1; +; char x2; +; char x3; +; char x4; +; char x5; +; }; +; +; void fS1(struct S1 s); +; void fS2(struct S2 s); +; +; void f1() { +; struct S1 s1_1; +; fS1(s1_1); +; } +; +; void f2() { +; struct S2 s2_1; +; fS2(s2_1); +; } +; +; int main() { +; f1(); +; f2(); +; } + +%struct.S1 = type { i8, i16, i8 } +%struct.S2 = type { i8, i8, i8, i8, i8 } + +declare void @fS1(i48 inreg) #1 +declare void @fS2(i40 inreg) #1 + +declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #2 + +define void @f1() #0 { +entry: + %s1_1 = alloca %struct.S1, align 2 + %s1_1.coerce = alloca { i48 } + %0 = bitcast { i48 }* %s1_1.coerce to i8* + %1 = bitcast %struct.S1* %s1_1 to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* %1, i64 6, i32 0, i1 false) + %2 = getelementptr { i48 }, { i48 }* %s1_1.coerce, i32 0, i32 0 + %3 = load i48, i48* %2, align 1 + call void @fS1(i48 inreg %3) + ret void + ; ALL-LABEL: f1: + + ; MIPSEB: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 16 + ; MIPSEL-NOT: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 16 +} + +define void @f2() #0 { +entry: + %s2_1 = alloca %struct.S2, align 1 + %s2_1.coerce = alloca { i40 } + %0 = bitcast { i40 }* %s2_1.coerce to i8* + %1 = bitcast %struct.S2* %s2_1 to i8* + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* %1, i64 5, i32 0, i1 false) + %2 = getelementptr { i40 }, { i40 }* %s2_1.coerce, i32 0, i32 0 + %3 = load i40, i40* %2, align 1 + call void @fS2(i40 inreg %3) + ret void + ; ALL-LABEL: f2: + + ; MIPSEB: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 24 + ; MIPSEL-NOT: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 24 +} diff --git a/test/CodeGen/Mips/cconv/arguments-struct.ll b/test/CodeGen/Mips/cconv/arguments-struct.ll index 7ff894f..ee6bfae 100644 --- a/test/CodeGen/Mips/cconv/arguments-struct.ll +++ b/test/CodeGen/Mips/cconv/arguments-struct.ll @@ -19,7 +19,7 @@ define void @s_i8(i8 inreg %a) nounwind { entry: - store i8 %a, i8* getelementptr inbounds ([2 x i8]* @bytes, i32 0, i32 1) + store i8 %a, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @bytes, i32 0, i32 1) 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 458b124..abb3601 100644 --- a/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll +++ b/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-byte.ll @@ -140,11 +140,11 @@ define void @smallStruct_1b(%struct.SmallStruct_1b* %ss) #0 { entry: %ss.addr = alloca %struct.SmallStruct_1b*, align 8 store %struct.SmallStruct_1b* %ss, %struct.SmallStruct_1b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_1b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss.addr, align 8 %1 = bitcast %struct.SmallStruct_1b* %0 to { i8 }* - %2 = getelementptr { 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) + %2 = getelementptr { i8 }, { i8 }* %1, i32 0, i32 0 + %3 = load i8, i8* %2, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8 inreg %3) ret void ; CHECK-LABEL: smallStruct_1b: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 56 @@ -154,11 +154,11 @@ define void @smallStruct_2b(%struct.SmallStruct_2b* %ss) #0 { entry: %ss.addr = alloca %struct.SmallStruct_2b*, align 8 store %struct.SmallStruct_2b* %ss, %struct.SmallStruct_2b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_2b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_2b*, %struct.SmallStruct_2b** %ss.addr, align 8 %1 = bitcast %struct.SmallStruct_2b* %0 to { i16 }* - %2 = getelementptr { 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) + %2 = getelementptr { i16 }, { i16 }* %1, i32 0, i32 0 + %3 = load i16, i16* %2, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i16 inreg %3) ret void ; CHECK-LABEL: smallStruct_2b: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 48 @@ -169,13 +169,13 @@ entry: %ss.addr = alloca %struct.SmallStruct_3b*, align 8 %.coerce = alloca { i24 } store %struct.SmallStruct_3b* %ss, %struct.SmallStruct_3b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_3b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_3b*, %struct.SmallStruct_3b** %ss.addr, align 8 %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 - %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) + %3 = getelementptr { i24 }, { i24 }* %.coerce, i32 0, i32 0 + %4 = load i24, i24* %3, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i24 inreg %4) ret void ; CHECK-LABEL: smallStruct_3b: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 40 @@ -187,11 +187,11 @@ define void @smallStruct_4b(%struct.SmallStruct_4b* %ss) #0 { entry: %ss.addr = alloca %struct.SmallStruct_4b*, align 8 store %struct.SmallStruct_4b* %ss, %struct.SmallStruct_4b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_4b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_4b*, %struct.SmallStruct_4b** %ss.addr, align 8 %1 = bitcast %struct.SmallStruct_4b* %0 to { i32 }* - %2 = getelementptr { 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) + %2 = getelementptr { i32 }, { i32 }* %1, i32 0, i32 0 + %3 = load i32, i32* %2, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i32 inreg %3) ret void ; CHECK-LABEL: smallStruct_4b: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 32 @@ -202,13 +202,13 @@ entry: %ss.addr = alloca %struct.SmallStruct_5b*, align 8 %.coerce = alloca { i40 } store %struct.SmallStruct_5b* %ss, %struct.SmallStruct_5b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_5b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_5b*, %struct.SmallStruct_5b** %ss.addr, align 8 %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 - %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) + %3 = getelementptr { i40 }, { i40 }* %.coerce, i32 0, i32 0 + %4 = load i40, i40* %3, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i40 inreg %4) ret void ; CHECK-LABEL: smallStruct_5b: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 24 @@ -219,13 +219,13 @@ entry: %ss.addr = alloca %struct.SmallStruct_6b*, align 8 %.coerce = alloca { i48 } store %struct.SmallStruct_6b* %ss, %struct.SmallStruct_6b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_6b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_6b*, %struct.SmallStruct_6b** %ss.addr, align 8 %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 - %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) + %3 = getelementptr { i48 }, { i48 }* %.coerce, i32 0, i32 0 + %4 = load i48, i48* %3, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i48 inreg %4) ret void ; CHECK-LABEL: smallStruct_6b: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 16 @@ -236,13 +236,13 @@ entry: %ss.addr = alloca %struct.SmallStruct_7b*, align 8 %.coerce = alloca { i56 } store %struct.SmallStruct_7b* %ss, %struct.SmallStruct_7b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_7b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_7b*, %struct.SmallStruct_7b** %ss.addr, align 8 %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 - %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) + %3 = getelementptr { i56 }, { i56 }* %.coerce, i32 0, i32 0 + %4 = load i56, i56* %3, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i56 inreg %4) ret void ; CHECK-LABEL: smallStruct_7b: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 8 @@ -252,11 +252,11 @@ define void @smallStruct_8b(%struct.SmallStruct_8b* %ss) #0 { entry: %ss.addr = alloca %struct.SmallStruct_8b*, align 8 store %struct.SmallStruct_8b* %ss, %struct.SmallStruct_8b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_8b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_8b*, %struct.SmallStruct_8b** %ss.addr, align 8 %1 = bitcast %struct.SmallStruct_8b* %0 to { i64 }* - %2 = getelementptr { 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) + %2 = getelementptr { i64 }, { i64 }* %1, i32 0, i32 0 + %3 = load i64, i64* %2, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i64 inreg %3) ret void ; CHECK-LABEL: smallStruct_8b: ; CHECK-NOT: dsll @@ -267,15 +267,15 @@ entry: %ss.addr = alloca %struct.SmallStruct_9b*, align 8 %.coerce = alloca { i64, i8 } store %struct.SmallStruct_9b* %ss, %struct.SmallStruct_9b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_9b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_9b*, %struct.SmallStruct_9b** %ss.addr, align 8 %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 - %4 = load i64* %3, align 1 - %5 = getelementptr { 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) + %3 = getelementptr { i64, i8 }, { i64, i8 }* %.coerce, i32 0, i32 0 + %4 = load i64, i64* %3, align 1 + %5 = getelementptr { i64, i8 }, { i64, i8 }* %.coerce, i32 0, i32 1 + %6 = load i8, i8* %5, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i64 inreg %4, i8 inreg %6) ret void ; CHECK-LABEL: smallStruct_9b: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 56 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 899a3e8..7da6ab1 100644 --- a/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll +++ b/test/CodeGen/Mips/cconv/arguments-varargs-small-structs-combinations.ll @@ -74,11 +74,11 @@ define void @smallStruct_1b1s(%struct.SmallStruct_1b1s* %ss) #0 { entry: %ss.addr = alloca %struct.SmallStruct_1b1s*, align 8 store %struct.SmallStruct_1b1s* %ss, %struct.SmallStruct_1b1s** %ss.addr, align 8 - %0 = load %struct.SmallStruct_1b1s** %ss.addr, align 8 + %0 = load %struct.SmallStruct_1b1s*, %struct.SmallStruct_1b1s** %ss.addr, align 8 %1 = bitcast %struct.SmallStruct_1b1s* %0 to { i32 }* - %2 = getelementptr { 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) + %2 = getelementptr { i32 }, { i32 }* %1, i32 0, i32 0 + %3 = load i32, i32* %2, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i32 inreg %3) ret void ; CHECK-LABEL: smallStruct_1b1s: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 32 @@ -88,11 +88,11 @@ define void @smallStruct_1b1i(%struct.SmallStruct_1b1i* %ss) #0 { entry: %ss.addr = alloca %struct.SmallStruct_1b1i*, align 8 store %struct.SmallStruct_1b1i* %ss, %struct.SmallStruct_1b1i** %ss.addr, align 8 - %0 = load %struct.SmallStruct_1b1i** %ss.addr, align 8 + %0 = load %struct.SmallStruct_1b1i*, %struct.SmallStruct_1b1i** %ss.addr, align 8 %1 = bitcast %struct.SmallStruct_1b1i* %0 to { i64 }* - %2 = getelementptr { 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) + %2 = getelementptr { i64 }, { i64 }* %1, i32 0, i32 0 + %3 = load i64, i64* %2, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i64 inreg %3) ret void ; CHECK-LABEL: smallStruct_1b1i: ; CHECK-NOT: dsll @@ -103,13 +103,13 @@ entry: %ss.addr = alloca %struct.SmallStruct_1b1s1b*, align 8 %.coerce = alloca { i48 } store %struct.SmallStruct_1b1s1b* %ss, %struct.SmallStruct_1b1s1b** %ss.addr, align 8 - %0 = load %struct.SmallStruct_1b1s1b** %ss.addr, align 8 + %0 = load %struct.SmallStruct_1b1s1b*, %struct.SmallStruct_1b1s1b** %ss.addr, align 8 %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 - %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) + %3 = getelementptr { i48 }, { i48 }* %.coerce, i32 0, i32 0 + %4 = load i48, i48* %3, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i48 inreg %4) ret void ; CHECK-LABEL: smallStruct_1b1s1b: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 16 @@ -121,11 +121,11 @@ define void @smallStruct_1s1i(%struct.SmallStruct_1s1i* %ss) #0 { entry: %ss.addr = alloca %struct.SmallStruct_1s1i*, align 8 store %struct.SmallStruct_1s1i* %ss, %struct.SmallStruct_1s1i** %ss.addr, align 8 - %0 = load %struct.SmallStruct_1s1i** %ss.addr, align 8 + %0 = load %struct.SmallStruct_1s1i*, %struct.SmallStruct_1s1i** %ss.addr, align 8 %1 = bitcast %struct.SmallStruct_1s1i* %0 to { i64 }* - %2 = getelementptr { 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) + %2 = getelementptr { i64 }, { i64 }* %1, i32 0, i32 0 + %3 = load i64, i64* %2, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i64 inreg %3) ret void ; CHECK-LABEL: smallStruct_1s1i: ; CHECK-NOT: dsll @@ -136,13 +136,13 @@ entry: %ss.addr = alloca %struct.SmallStruct_3b1s*, align 8 %.coerce = alloca { i48 } store %struct.SmallStruct_3b1s* %ss, %struct.SmallStruct_3b1s** %ss.addr, align 8 - %0 = load %struct.SmallStruct_3b1s** %ss.addr, align 8 + %0 = load %struct.SmallStruct_3b1s*, %struct.SmallStruct_3b1s** %ss.addr, align 8 %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 - %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) + %3 = getelementptr { i48 }, { i48 }* %.coerce, i32 0, i32 0 + %4 = load i48, i48* %3, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i48 inreg %4) ret void ; CHECK-LABEL: smallStruct_3b1s: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 16 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 1f73625..f70b75f 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 @@ -110,43 +110,43 @@ entry: store %struct.SmallStruct_1b* %ss7, %struct.SmallStruct_1b** %ss7.addr, align 8 store %struct.SmallStruct_1b* %ss8, %struct.SmallStruct_1b** %ss8.addr, align 8 store %struct.SmallStruct_1b* %ss9, %struct.SmallStruct_1b** %ss9.addr, align 8 - %0 = load %struct.SmallStruct_1b** %ss1.addr, align 8 - %1 = load %struct.SmallStruct_1b** %ss2.addr, align 8 - %2 = load %struct.SmallStruct_1b** %ss3.addr, align 8 - %3 = load %struct.SmallStruct_1b** %ss4.addr, align 8 - %4 = load %struct.SmallStruct_1b** %ss5.addr, align 8 - %5 = load %struct.SmallStruct_1b** %ss6.addr, align 8 - %6 = load %struct.SmallStruct_1b** %ss7.addr, align 8 - %7 = load %struct.SmallStruct_1b** %ss8.addr, align 8 - %8 = load %struct.SmallStruct_1b** %ss9.addr, align 8 + %0 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss1.addr, align 8 + %1 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss2.addr, align 8 + %2 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss3.addr, align 8 + %3 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss4.addr, align 8 + %4 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss5.addr, align 8 + %5 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss6.addr, align 8 + %6 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss7.addr, align 8 + %7 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss8.addr, align 8 + %8 = load %struct.SmallStruct_1b*, %struct.SmallStruct_1b** %ss9.addr, align 8 %9 = bitcast %struct.SmallStruct_1b* %0 to { i8 }* - %10 = getelementptr { i8 }* %9, i32 0, i32 0 - %11 = load i8* %10, align 1 + %10 = getelementptr { i8 }, { i8 }* %9, i32 0, i32 0 + %11 = load i8, i8* %10, align 1 %12 = bitcast %struct.SmallStruct_1b* %1 to { i8 }* - %13 = getelementptr { i8 }* %12, i32 0, i32 0 - %14 = load i8* %13, align 1 + %13 = getelementptr { i8 }, { i8 }* %12, i32 0, i32 0 + %14 = load i8, i8* %13, align 1 %15 = bitcast %struct.SmallStruct_1b* %2 to { i8 }* - %16 = getelementptr { i8 }* %15, i32 0, i32 0 - %17 = load i8* %16, align 1 + %16 = getelementptr { i8 }, { i8 }* %15, i32 0, i32 0 + %17 = load i8, i8* %16, align 1 %18 = bitcast %struct.SmallStruct_1b* %3 to { i8 }* - %19 = getelementptr { i8 }* %18, i32 0, i32 0 - %20 = load i8* %19, align 1 + %19 = getelementptr { i8 }, { i8 }* %18, i32 0, i32 0 + %20 = load i8, i8* %19, align 1 %21 = bitcast %struct.SmallStruct_1b* %4 to { i8 }* - %22 = getelementptr { i8 }* %21, i32 0, i32 0 - %23 = load i8* %22, align 1 + %22 = getelementptr { i8 }, { i8 }* %21, i32 0, i32 0 + %23 = load i8, i8* %22, align 1 %24 = bitcast %struct.SmallStruct_1b* %5 to { i8 }* - %25 = getelementptr { i8 }* %24, i32 0, i32 0 - %26 = load i8* %25, align 1 + %25 = getelementptr { i8 }, { i8 }* %24, i32 0, i32 0 + %26 = load i8, i8* %25, align 1 %27 = bitcast %struct.SmallStruct_1b* %6 to { i8 }* - %28 = getelementptr { i8 }* %27, i32 0, i32 0 - %29 = load i8* %28, align 1 + %28 = getelementptr { i8 }, { i8 }* %27, i32 0, i32 0 + %29 = load i8, i8* %28, align 1 %30 = bitcast %struct.SmallStruct_1b* %7 to { i8 }* - %31 = getelementptr { i8 }* %30, i32 0, i32 0 - %32 = load i8* %31, align 1 + %31 = getelementptr { i8 }, { i8 }* %30, i32 0, i32 0 + %32 = load i8, i8* %31, align 1 %33 = bitcast %struct.SmallStruct_1b* %8 to { i8 }* - %34 = getelementptr { 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) + %34 = getelementptr { i8 }, { i8 }* %33, i32 0, i32 0 + %35 = load i8, i8* %34, align 1 + call void (i8*, ...)* @varArgF_SmallStruct(i8* getelementptr inbounds ([3 x i8], [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 ; CHECK-LABEL: smallStruct_1b_x9: ; CHECK: dsll $[[R1:[0-9]+]], $[[R2:[0-9]+]], 56 diff --git a/test/CodeGen/Mips/cconv/arguments-varargs.ll b/test/CodeGen/Mips/cconv/arguments-varargs.ll index 6e6f48b..af217c9 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 98671aa..430705f 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/cconv/return-float.ll b/test/CodeGen/Mips/cconv/return-float.ll index 8c4c31c..4355a55 100644 --- a/test/CodeGen/Mips/cconv/return-float.ll +++ b/test/CodeGen/Mips/cconv/return-float.ll @@ -21,7 +21,7 @@ define float @retfloat() nounwind { entry: - %0 = load volatile float* @float + %0 = load volatile float, float* @float ret float %0 } @@ -35,7 +35,7 @@ entry: define double @retdouble() nounwind { entry: - %0 = load volatile double* @double + %0 = load volatile double, double* @double ret double %0 } diff --git a/test/CodeGen/Mips/cconv/return-hard-float.ll b/test/CodeGen/Mips/cconv/return-hard-float.ll index f0aeb12..14853c8 100644 --- a/test/CodeGen/Mips/cconv/return-hard-float.ll +++ b/test/CodeGen/Mips/cconv/return-hard-float.ll @@ -24,7 +24,7 @@ define float @retfloat() nounwind { entry: - %0 = load volatile float* @float + %0 = load volatile float, float* @float ret float %0 } @@ -38,7 +38,7 @@ entry: define double @retdouble() nounwind { entry: - %0 = load volatile double* @double + %0 = load volatile double, double* @double ret double %0 } @@ -50,7 +50,7 @@ entry: define { double, double } @retComplexDouble() #0 { %retval = alloca { double, double }, align 8 - %1 = load { double, double }* %retval + %1 = load { double, double }, { double, double }* %retval ret { double, double } %1 } diff --git a/test/CodeGen/Mips/cconv/return-hard-fp128.ll b/test/CodeGen/Mips/cconv/return-hard-fp128.ll index 05dacfe..34e9647 100644 --- a/test/CodeGen/Mips/cconv/return-hard-fp128.ll +++ b/test/CodeGen/Mips/cconv/return-hard-fp128.ll @@ -13,7 +13,7 @@ define fp128 @retldouble() nounwind { entry: - %0 = load volatile fp128* @fp128 + %0 = load volatile fp128, fp128* @fp128 ret fp128 %0 } diff --git a/test/CodeGen/Mips/cconv/return-hard-struct-f128.ll b/test/CodeGen/Mips/cconv/return-hard-struct-f128.ll index 4ce26b1..c4c8f10 100644 --- a/test/CodeGen/Mips/cconv/return-hard-struct-f128.ll +++ b/test/CodeGen/Mips/cconv/return-hard-struct-f128.ll @@ -10,7 +10,7 @@ define inreg {fp128} @ret_struct_fp128() nounwind { entry: - %0 = load volatile {fp128}* @struct_fp128 + %0 = load volatile {fp128}, {fp128}* @struct_fp128 ret {fp128} %0 } diff --git a/test/CodeGen/Mips/cconv/return-struct.ll b/test/CodeGen/Mips/cconv/return-struct.ll index 3d591df..8decd04 100644 --- a/test/CodeGen/Mips/cconv/return-struct.ll +++ b/test/CodeGen/Mips/cconv/return-struct.ll @@ -22,7 +22,7 @@ declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i define inreg {i8} @ret_struct_i8() nounwind { entry: - %0 = load volatile {i8}* @struct_byte + %0 = load volatile {i8}, {i8}* @struct_byte ret {i8} %0 } @@ -52,9 +52,9 @@ define inreg {i16} @ret_struct_i16() nounwind { entry: %retval = alloca {i8,i8}, align 1 %0 = bitcast {i8,i8}* %retval to i8* - call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* getelementptr inbounds ({i8,i8}* @struct_2byte, i32 0, i32 0), i64 2, i32 1, i1 false) + call void @llvm.memcpy.p0i8.p0i8.i64(i8* %0, i8* getelementptr inbounds ({i8,i8}, {i8,i8}* @struct_2byte, i32 0, i32 0), i64 2, i32 1, i1 false) %1 = bitcast {i8,i8}* %retval to {i16}* - %2 = load volatile {i16}* %1 + %2 = load volatile {i16}, {i16}* %1 ret {i16} %2 } @@ -91,7 +91,7 @@ entry: ; missed by the CCPromoteToType and the shift didn't happen. define inreg {i48} @ret_struct_3xi16() nounwind { entry: - %0 = load volatile i48* bitcast ({[3 x i16]}* @struct_3xi16 to i48*), align 2 + %0 = load volatile i48, i48* bitcast ({[3 x i16]}* @struct_3xi16 to i48*), align 2 %1 = insertvalue {i48} undef, i48 %0, 0 ret {i48} %1 } @@ -174,7 +174,7 @@ entry: ; This time we let the backend lower the sret argument. define {[6 x i32]} @ret_struct_6xi32() { entry: - %0 = load volatile {[6 x i32]}* @struct_6xi32, align 2 + %0 = load volatile {[6 x i32]}, {[6 x i32]}* @struct_6xi32, align 2 ret {[6 x i32]} %0 } diff --git a/test/CodeGen/Mips/cconv/return.ll b/test/CodeGen/Mips/cconv/return.ll index 516026d..a537672 100644 --- a/test/CodeGen/Mips/cconv/return.ll +++ b/test/CodeGen/Mips/cconv/return.ll @@ -24,7 +24,7 @@ define i8 @reti8() nounwind { entry: - %0 = load volatile i8* @byte + %0 = load volatile i8, i8* @byte ret i8 %0 } @@ -38,7 +38,7 @@ entry: define i32 @reti32() nounwind { entry: - %0 = load volatile i32* @word + %0 = load volatile i32, i32* @word ret i32 %0 } @@ -52,7 +52,7 @@ entry: define i64 @reti64() nounwind { entry: - %0 = load volatile i64* @dword + %0 = load volatile i64, i64* @dword ret i64 %0 } |