From 9806806f39986d13292baa75fe71021d41325a2d Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 29 Jan 2013 03:21:00 +0000 Subject: [PATCH] Modify the tests for the (sorted) order that the attributes come out as now. llvm-svn: 173762 --- clang/test/CodeGen/arm-arguments.c | 28 ++++++++++++------------- clang/test/CodeGen/arm-pnaclcall.c | 2 +- clang/test/CodeGen/arm-vector-arguments.c | 6 +++--- clang/test/CodeGen/blocks.c | 2 +- clang/test/CodeGen/le32-arguments.c | 2 +- clang/test/CodeGen/mips-vector-return.c | 6 +++--- clang/test/CodeGen/mips64-nontrivial-return.cpp | 2 +- clang/test/CodeGen/mips64-padding-arg.c | 2 +- clang/test/CodeGen/x86_32-arguments-darwin.c | 18 ++++++++-------- clang/test/CodeGen/x86_64-arguments-nacl.c | 4 ++-- clang/test/CodeGen/x86_64-arguments.c | 6 +++--- clang/test/CodeGenCXX/lambda-expressions.cpp | 2 +- clang/test/CodeGenCXX/temporaries.cpp | 6 +++--- clang/test/CodeGenCXX/x86_32-arguments.cpp | 8 +++---- clang/test/CodeGenCXX/x86_64-arguments.cpp | 4 ++-- 15 files changed, 49 insertions(+), 49 deletions(-) diff --git a/clang/test/CodeGen/arm-arguments.c b/clang/test/CodeGen/arm-arguments.c index 63ecd4c..026403f 100644 --- a/clang/test/CodeGen/arm-arguments.c +++ b/clang/test/CodeGen/arm-arguments.c @@ -29,13 +29,13 @@ struct s4 { struct s4_0 { int f0; } f0; }; struct s4 f4(void) {} // APCS-GNU: define void @f5( -// APCS-GNU: struct.s5* noalias sret +// APCS-GNU: struct.s5* sret noalias // AAPCS: define arm_aapcscc i32 @f5() struct s5 { struct { } f0; int f1; }; struct s5 f5(void) {} // APCS-GNU: define void @f6( -// APCS-GNU: struct.s6* noalias sret +// APCS-GNU: struct.s6* sret noalias // AAPCS: define arm_aapcscc i32 @f6() struct s6 { int f0[1]; }; struct s6 f6(void) {} @@ -46,7 +46,7 @@ struct s7 { struct { int : 0; } f0; }; struct s7 f7(void) {} // APCS-GNU: define void @f8( -// APCS-GNU: struct.s8* noalias sret +// APCS-GNU: struct.s8* sret noalias // AAPCS: define arm_aapcscc void @f8() struct s8 { struct { int : 0; } f0[1]; }; struct s8 f8(void) {} @@ -62,7 +62,7 @@ struct s10 { int f0; int : 0; int : 0; }; struct s10 f10(void) {} // APCS-GNU: define void @f11( -// APCS-GNU: struct.s11* noalias sret +// APCS-GNU: struct.s11* sret noalias // AAPCS: define arm_aapcscc i32 @f11() struct s11 { int : 0; int f0; }; struct s11 f11(void) {} @@ -73,7 +73,7 @@ union u12 { char f0; short f1; int f2; }; union u12 f12(void) {} // APCS-GNU: define void @f13( -// APCS-GNU: struct.s13* noalias sret +// APCS-GNU: struct.s13* sret noalias // FIXME: This should return a float. // AAPCS-FIXME: darm_aapcscc efine float @f13() @@ -81,7 +81,7 @@ struct s13 { float f0; }; struct s13 f13(void) {} // APCS-GNU: define void @f14( -// APCS-GNU: union.u14* noalias sret +// APCS-GNU: union.u14* sret noalias // AAPCS: define arm_aapcscc i32 @f14() union u14 { float f0; }; union u14 f14(void) {} @@ -105,13 +105,13 @@ struct s18 { short f0; char f1 : 4; }; struct s18 f18(void) {} // APCS-GNU: define void @f19( -// APCS-GNU: struct.s19* noalias sret +// APCS-GNU: struct.s19* sret noalias // AAPCS: define arm_aapcscc i32 @f19() struct s19 { int f0; struct s8 f1; }; struct s19 f19(void) {} // APCS-GNU: define void @f20( -// APCS-GNU: struct.s20* noalias sret +// APCS-GNU: struct.s20* sret noalias // AAPCS: define arm_aapcscc i32 @f20() struct s20 { struct s8 f1; int f0; }; struct s20 f20(void) {} @@ -129,10 +129,10 @@ struct s21 f21(void) {} // APCS-GNU: define i128 @f27() // AAPCS: define arm_aapcscc i16 @f22() // AAPCS: define arm_aapcscc i32 @f23() -// AAPCS: define arm_aapcscc void @f24({{.*}} noalias sret -// AAPCS: define arm_aapcscc void @f25({{.*}} noalias sret -// AAPCS: define arm_aapcscc void @f26({{.*}} noalias sret -// AAPCS: define arm_aapcscc void @f27({{.*}} noalias sret +// AAPCS: define arm_aapcscc void @f24({{.*}} sret noalias +// AAPCS: define arm_aapcscc void @f25({{.*}} sret noalias +// AAPCS: define arm_aapcscc void @f26({{.*}} sret noalias +// AAPCS: define arm_aapcscc void @f27({{.*}} sret noalias _Complex char f22(void) {} _Complex short f23(void) {} _Complex int f24(void) {} @@ -150,8 +150,8 @@ struct s28 f28() {} struct s29 { _Complex short f0; }; struct s29 f29() {} -// APCS-GNU: define void @f30({{.*}} noalias sret -// AAPCS: define arm_aapcscc void @f30({{.*}} noalias sret +// APCS-GNU: define void @f30({{.*}} sret noalias +// AAPCS: define arm_aapcscc void @f30({{.*}} sret noalias struct s30 { _Complex int f0; }; struct s30 f30() {} diff --git a/clang/test/CodeGen/arm-pnaclcall.c b/clang/test/CodeGen/arm-pnaclcall.c index 5025995..009c80b 100644 --- a/clang/test/CodeGen/arm-pnaclcall.c +++ b/clang/test/CodeGen/arm-pnaclcall.c @@ -12,7 +12,7 @@ typedef struct { // CHECK: define i32 @f48(%struct.s1* byval %s) int __attribute__((pnaclcall)) f48(s1 s) { return s.a; } -// CHECK: define void @f49(%struct.s1* noalias sret %agg.result) +// CHECK: define void @f49(%struct.s1* sret noalias %agg.result) s1 __attribute__((pnaclcall)) f49() { s1 s; s.a = s.b = 1; return s; } union simple_union { diff --git a/clang/test/CodeGen/arm-vector-arguments.c b/clang/test/CodeGen/arm-vector-arguments.c index 9bdddb7..2913fd6 100644 --- a/clang/test/CodeGen/arm-vector-arguments.c +++ b/clang/test/CodeGen/arm-vector-arguments.c @@ -9,7 +9,7 @@ #include -// CHECK: define void @f0(%struct.int8x16x2_t* noalias sret %agg.result, <16 x i8> %{{.*}}, <16 x i8> %{{.*}}) +// CHECK: define void @f0(%struct.int8x16x2_t* sret noalias %agg.result, <16 x i8> %{{.*}}, <16 x i8> %{{.*}}) int8x16x2_t f0(int8x16_t a0, int8x16_t a1) { return vzipq_s8(a0, a1); } @@ -25,7 +25,7 @@ typedef float T_float32x16 __attribute__ ((__vector_size__ (64))); T_float32x2 f1_0(T_float32x2 a0) { return a0; } // CHECK: define <4 x float> @f1_1(<4 x float> %{{.*}}) T_float32x4 f1_1(T_float32x4 a0) { return a0; } -// CHECK: define void @f1_2(<8 x float>* noalias sret %{{.*}}, <8 x float> %{{.*}}) +// CHECK: define void @f1_2(<8 x float>* sret noalias %{{.*}}, <8 x float> %{{.*}}) T_float32x8 f1_2(T_float32x8 a0) { return a0; } -// CHECK: define void @f1_3(<16 x float>* noalias sret %{{.*}}, <16 x float> %{{.*}}) +// CHECK: define void @f1_3(<16 x float>* sret noalias %{{.*}}, <16 x float> %{{.*}}) T_float32x16 f1_3(T_float32x16 a0) { return a0; } diff --git a/clang/test/CodeGen/blocks.c b/clang/test/CodeGen/blocks.c index 71f7171..7ac1870 100644 --- a/clang/test/CodeGen/blocks.c +++ b/clang/test/CodeGen/blocks.c @@ -12,7 +12,7 @@ struct s0 { int a[64]; }; -// CHECK: define internal void @__f2_block_invoke(%struct.s0* noalias sret {{%.*}}, i8* {{%.*}}, %struct.s0* byval align 4 {{.*}}) +// CHECK: define internal void @__f2_block_invoke(%struct.s0* sret noalias {{%.*}}, i8* {{%.*}}, %struct.s0* byval align 4 {{.*}}) struct s0 f2(struct s0 a0) { return ^(struct s0 a1){ return a1; }(a0); } diff --git a/clang/test/CodeGen/le32-arguments.c b/clang/test/CodeGen/le32-arguments.c index 2cbbc0f..2e2ac9c 100644 --- a/clang/test/CodeGen/le32-arguments.c +++ b/clang/test/CodeGen/le32-arguments.c @@ -17,7 +17,7 @@ typedef struct { int cc; } s2; // Structs should be returned sret and not simplified by the frontend -// CHECK: define void @f2(%struct.s2* noalias sret %agg.result) +// CHECK: define void @f2(%struct.s2* sret noalias %agg.result) s2 f2() { s2 foo; return foo; diff --git a/clang/test/CodeGen/mips-vector-return.c b/clang/test/CodeGen/mips-vector-return.c index 0bff969..c2aaf81 100644 --- a/clang/test/CodeGen/mips-vector-return.c +++ b/clang/test/CodeGen/mips-vector-return.c @@ -8,14 +8,14 @@ typedef float v4sf __attribute__ ((__vector_size__ (16))); typedef double v4df __attribute__ ((__vector_size__ (32))); typedef int v4i32 __attribute__ ((__vector_size__ (16))); -// O32: define void @test_v4sf(<4 x float>* noalias nocapture sret +// O32: define void @test_v4sf(<4 x float>* sret noalias nocapture // N64: define { i64, i64 } @test_v4sf v4sf test_v4sf(float a) { return (v4sf){0.0f, a, 0.0f, 0.0f}; } -// O32: define void @test_v4df(<4 x double>* noalias nocapture sret -// N64: define void @test_v4df(<4 x double>* noalias nocapture sret +// O32: define void @test_v4df(<4 x double>* sret noalias nocapture +// N64: define void @test_v4df(<4 x double>* sret noalias nocapture v4df test_v4df(double a) { return (v4df){0.0, a, 0.0, 0.0}; } diff --git a/clang/test/CodeGen/mips64-nontrivial-return.cpp b/clang/test/CodeGen/mips64-nontrivial-return.cpp index 2164b20..aa9cbae 100644 --- a/clang/test/CodeGen/mips64-nontrivial-return.cpp +++ b/clang/test/CodeGen/mips64-nontrivial-return.cpp @@ -10,7 +10,7 @@ class D : public B { extern D gd0; -// CHECK: _Z4foo1v(%class.D* noalias nocapture sret +// CHECK: _Z4foo1v(%class.D* sret noalias nocapture D foo1(void) { return gd0; diff --git a/clang/test/CodeGen/mips64-padding-arg.c b/clang/test/CodeGen/mips64-padding-arg.c index 85dc00c..22b7fe7 100644 --- a/clang/test/CodeGen/mips64-padding-arg.c +++ b/clang/test/CodeGen/mips64-padding-arg.c @@ -32,7 +32,7 @@ void foo3(int a0, long double a1) { // Insert padding after hidden argument. // -// N64: define void @foo5(%struct.S0* noalias sret %agg.result, i64, fp128 %a0) +// N64: define void @foo5(%struct.S0* sret noalias %agg.result, i64, fp128 %a0) // N64: call void @foo6(%struct.S0* sret %agg.result, i32 1, i32 2, i64 undef, fp128 %a0) // N64: declare void @foo6(%struct.S0* sret, i32, i32, i64, fp128) diff --git a/clang/test/CodeGen/x86_32-arguments-darwin.c b/clang/test/CodeGen/x86_32-arguments-darwin.c index 917ba72..e3a9f33 100644 --- a/clang/test/CodeGen/x86_32-arguments-darwin.c +++ b/clang/test/CodeGen/x86_32-arguments-darwin.c @@ -71,7 +71,7 @@ struct s10 { // Small vectors and 1 x {i64,double} are returned in registers // CHECK: i32 @f11() -// CHECK: void @f12(<2 x i32>* noalias sret %agg.result) +// CHECK: void @f12(<2 x i32>* sret noalias %agg.result) // CHECK: i64 @f13() // CHECK: i64 @f14() // CHECK: <2 x i64> @f15() @@ -93,11 +93,11 @@ T16 f16(void) { while (1) {} } // 128-bits). // CHECK: i32 @f17() -// CHECK: void @f18(%{{.*}}* noalias sret %agg.result) -// CHECK: void @f19(%{{.*}}* noalias sret %agg.result) -// CHECK: void @f20(%{{.*}}* noalias sret %agg.result) -// CHECK: void @f21(%{{.*}}* noalias sret %agg.result) -// CHECK: void @f22(%{{.*}}* noalias sret %agg.result) +// CHECK: void @f18(%{{.*}}* sret noalias %agg.result) +// CHECK: void @f19(%{{.*}}* sret noalias %agg.result) +// CHECK: void @f20(%{{.*}}* sret noalias %agg.result) +// CHECK: void @f21(%{{.*}}* sret noalias %agg.result) +// CHECK: void @f22(%{{.*}}* sret noalias %agg.result) struct { T11 a; } f17(void) { while (1) {} } struct { T12 a; } f18(void) { while (1) {} } struct { T13 a; } f19(void) { while (1) {} } @@ -116,11 +116,11 @@ struct { struct {} a; struct { float a[1]; } b; } f25(void) { while (1) {} } // Small structures are handled recursively // CHECK: i32 @f26() -// CHECK: void @f27(%struct.s27* noalias sret %agg.result) +// CHECK: void @f27(%struct.s27* sret noalias %agg.result) struct s26 { struct { char a, b; } a; struct { char a, b; } b; } f26(void) { while (1) {} } struct s27 { struct { char a, b, c; } a; struct { char a; } b; } f27(void) { while (1) {} } -// CHECK: void @f28(%struct.s28* noalias sret %agg.result) +// CHECK: void @f28(%struct.s28* sret noalias %agg.result) struct s28 { int a; int b[]; } f28(void) { while (1) {} } // CHECK: define i16 @f29() @@ -150,7 +150,7 @@ struct s36 { struct { int : 0; } a[2][10]; char b; char c; } f36(void) { while ( // CHECK: define float @f37() struct s37 { float c[1][1]; } f37(void) { while (1) {} } -// CHECK: define void @f38(%struct.s38* noalias sret %agg.result) +// CHECK: define void @f38(%struct.s38* sret noalias %agg.result) struct s38 { char a[3]; short b; } f38(void) { while (1) {} } // CHECK: define void @f39(%struct.s39* byval align 16 %x) diff --git a/clang/test/CodeGen/x86_64-arguments-nacl.c b/clang/test/CodeGen/x86_64-arguments-nacl.c index 8f756ca..c5ae360 100644 --- a/clang/test/CodeGen/x86_64-arguments-nacl.c +++ b/clang/test/CodeGen/x86_64-arguments-nacl.c @@ -61,7 +61,7 @@ void f12_1(struct s12 a0) {} // Check that sret parameter is accounted for when checking available integer // registers. -// CHECK: define void @f13(%struct.s13_0* noalias sret %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval align 8 %e, i32 %f) +// CHECK: define void @f13(%struct.s13_0* sret noalias %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval align 8 %e, i32 %f) struct s13_0 { long long f0[3]; }; struct s13_1 { long long f0[2]; }; @@ -99,7 +99,7 @@ typedef struct { // CHECK: define i32 @f48(%struct.s1* byval %s) int __attribute__((pnaclcall)) f48(s1 s) { return s.a; } -// CHECK: define void @f49(%struct.s1* noalias sret %agg.result) +// CHECK: define void @f49(%struct.s1* sret noalias %agg.result) s1 __attribute__((pnaclcall)) f49() { s1 s; s.a = s.b = 1; return s; } union simple_union { diff --git a/clang/test/CodeGen/x86_64-arguments.c b/clang/test/CodeGen/x86_64-arguments.c index 518ee84..120277b 100644 --- a/clang/test/CodeGen/x86_64-arguments.c +++ b/clang/test/CodeGen/x86_64-arguments.c @@ -43,7 +43,7 @@ void f7(e7 a0) { // Test merging/passing of upper eightbyte with X87 class. // -// CHECK: define void @f8_1(%union.u8* noalias sret %agg.result) +// CHECK: define void @f8_1(%union.u8* sret noalias %agg.result) // CHECK: define void @f8_2(%union.u8* byval align 16 %a0) union u8 { long double a; @@ -59,7 +59,7 @@ struct s9 { int a; int b; int : 0; } f9(void) { while (1) {} } struct s10 { int a; int b; int : 0; }; void f10(struct s10 a0) {} -// CHECK: define void @f11(%union.anon* noalias sret %agg.result) +// CHECK: define void @f11(%union.anon* sret noalias %agg.result) union { long double a; float b; } f11() { while (1) {} } // CHECK: define i32 @f12_0() @@ -70,7 +70,7 @@ void f12_1(struct s12 a0) {} // Check that sret parameter is accounted for when checking available integer // registers. -// CHECK: define void @f13(%struct.s13_0* noalias sret %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval align 8 %e, i32 %f) +// CHECK: define void @f13(%struct.s13_0* sret noalias %agg.result, i32 %a, i32 %b, i32 %c, i32 %d, {{.*}}* byval align 8 %e, i32 %f) struct s13_0 { long long f0[3]; }; struct s13_1 { long long f0[2]; }; diff --git a/clang/test/CodeGenCXX/lambda-expressions.cpp b/clang/test/CodeGenCXX/lambda-expressions.cpp index ce20399..54ee57a 100644 --- a/clang/test/CodeGenCXX/lambda-expressions.cpp +++ b/clang/test/CodeGenCXX/lambda-expressions.cpp @@ -91,7 +91,7 @@ void staticarrayref(){ }(); } -// CHECK: define internal void @"_ZZ1hvEN3$_88__invokeEv"(%struct.A* noalias sret %agg.result) +// CHECK: define internal void @"_ZZ1hvEN3$_88__invokeEv"(%struct.A* sret noalias %agg.result) // CHECK-NOT: = // CHECK: call void @"_ZZ1hvENK3$_8clEv"(%struct.A* sret %agg.result, // CHECK-NEXT: ret void diff --git a/clang/test/CodeGenCXX/temporaries.cpp b/clang/test/CodeGenCXX/temporaries.cpp index a369c2e..1335a35 100644 --- a/clang/test/CodeGenCXX/temporaries.cpp +++ b/clang/test/CodeGenCXX/temporaries.cpp @@ -395,7 +395,7 @@ namespace Elision { // CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* [[I]]) } - // CHECK: define void @_ZN7Elision5test2Ev([[A]]* noalias sret + // CHECK: define void @_ZN7Elision5test2Ev([[A]]* sret noalias A test2() { // CHECK: call void @_ZN7Elision3fooEv() // CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* [[RET:%.*]]) @@ -403,7 +403,7 @@ namespace Elision { return (foo(), A()); } - // CHECK: define void @_ZN7Elision5test3EiNS_1AE([[A]]* noalias sret + // CHECK: define void @_ZN7Elision5test3EiNS_1AE([[A]]* sret noalias A test3(int v, A x) { if (v < 5) // CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[RET:%.*]]) @@ -444,7 +444,7 @@ namespace Elision { } // rdar://problem/8433352 - // CHECK: define void @_ZN7Elision5test5Ev([[A]]* noalias sret + // CHECK: define void @_ZN7Elision5test5Ev([[A]]* sret noalias struct B { A a; B(); }; A test5() { // CHECK: [[AT0:%.*]] = alloca [[A]], align 8 diff --git a/clang/test/CodeGenCXX/x86_32-arguments.cpp b/clang/test/CodeGenCXX/x86_32-arguments.cpp index 4404de0..1e6fbb7 100644 --- a/clang/test/CodeGenCXX/x86_32-arguments.cpp +++ b/clang/test/CodeGenCXX/x86_32-arguments.cpp @@ -6,7 +6,7 @@ struct S { short s; }; -// CHECK: define void @_Z1fv(%struct.S* noalias sret % +// CHECK: define void @_Z1fv(%struct.S* sret noalias % S f() { return S(); } // CHECK: define void @_Z1f1S(%struct.S*) void f(S) { } @@ -18,7 +18,7 @@ public: double c; }; -// CHECK: define void @_Z1gv(%class.C* noalias sret % +// CHECK: define void @_Z1gv(%class.C* sret noalias % C g() { return C(); } // CHECK: define void @_Z1f1C(%class.C*) @@ -103,13 +103,13 @@ struct s7_1 { double x; }; struct s7 : s7_0, s7_1 { }; s7 f7() { return s7(); } -// CHECK: define void @_Z2f8v(%struct.s8* noalias sret %agg.result) +// CHECK: define void @_Z2f8v(%struct.s8* sret noalias %agg.result) struct s8_0 { }; struct s8_1 { double x; }; struct s8 { s8_0 a; s8_1 b; }; s8 f8() { return s8(); } -// CHECK: define void @_Z2f9v(%struct.s9* noalias sret %agg.result) +// CHECK: define void @_Z2f9v(%struct.s9* sret noalias %agg.result) struct s9_0 { unsigned : 0; }; struct s9_1 { double x; }; struct s9 { s9_0 a; s9_1 b; }; diff --git a/clang/test/CodeGenCXX/x86_64-arguments.cpp b/clang/test/CodeGenCXX/x86_64-arguments.cpp index 6721803..79f6f9c 100644 --- a/clang/test/CodeGenCXX/x86_64-arguments.cpp +++ b/clang/test/CodeGenCXX/x86_64-arguments.cpp @@ -161,7 +161,7 @@ namespace test9 { // CHECK: define void @_ZN5test93fooEPNS_1SEPNS_1TE([[S:%.*]]*, [[T:%.*]]*) void foo(S*, T*) {} - // CHECK: define void @_ZN5test91aEiiiiNS_1TEPv([[S]]* noalias sret {{%.*}}, i32, i32, i32, i32, [[T]]* byval align 8, i8*) + // CHECK: define void @_ZN5test91aEiiiiNS_1TEPv([[S]]* sret noalias {{%.*}}, i32, i32, i32, i32, [[T]]* byval align 8, i8*) S a(int, int, int, int, T, void*) { return S(); } @@ -171,7 +171,7 @@ namespace test9 { return sret; } - // CHECK: define void @_ZN5test91cEiiiNS_1TEPv([[S]]* noalias sret {{%.*}}, i32, i32, i32, i8* {{%.*}}, i8* {{%.*}}, i8*) + // CHECK: define void @_ZN5test91cEiiiNS_1TEPv([[S]]* sret noalias {{%.*}}, i32, i32, i32, i8* {{%.*}}, i8* {{%.*}}, i8*) S c(int, int, int, T, void*) { return S(); } -- 2.7.4