diff options
author | JF Bastien <jfb@google.com> | 2013-07-17 05:57:42 +0000 |
---|---|---|
committer | JF Bastien <jfb@google.com> | 2013-07-17 05:57:42 +0000 |
commit | 27dcbb24e535d4e96eb9c1083d9888b4f5c9e92d (patch) | |
tree | 4855645205a89c53469a5c87c37b44b43375a8c9 /clang/test/CodeGen/volatile-2.c | |
parent | cd4c64d2347e2fd92ab2a2a32e3c315cbdb3fc20 (diff) | |
download | bcm5719-llvm-27dcbb24e535d4e96eb9c1083d9888b4f5c9e92d.tar.gz bcm5719-llvm-27dcbb24e535d4e96eb9c1083d9888b4f5c9e92d.zip |
Propagate alignment for _Complex
_Complex load/store didn't have their alignment set properly, which was visible when GCC's torture tests use volatile _Complex.
Update some existing tests to check for alignment, and add a new test which also has over-aligned volatile _Complex (since the imaginary part shouldn't be overaligned, only the real part).
llvm-svn: 186490
Diffstat (limited to 'clang/test/CodeGen/volatile-2.c')
-rw-r--r-- | clang/test/CodeGen/volatile-2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/CodeGen/volatile-2.c b/clang/test/CodeGen/volatile-2.c index 3d342de6900..9233b2a1678 100644 --- a/clang/test/CodeGen/volatile-2.c +++ b/clang/test/CodeGen/volatile-2.c @@ -3,8 +3,8 @@ void test0() { // CHECK: define void @test0() // CHECK: [[F:%.*]] = alloca float - // CHECK-NEXT: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @test0_v, i32 0, i32 0) - // CHECK-NEXT: load volatile float* getelementptr inbounds ({{.*}} @test0_v, i32 0, i32 1) + // CHECK-NEXT: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({ float, float }* @test0_v, i32 0, i32 0), align 4 + // CHECK-NEXT: load volatile float* getelementptr inbounds ({{.*}} @test0_v, i32 0, i32 1), align 4 // CHECK-NEXT: store float [[REAL]], float* [[F]], align 4 // CHECK-NEXT: ret void extern volatile _Complex float test0_v; @@ -13,10 +13,10 @@ void test0() { void test1() { // CHECK: define void @test1() - // CHECK: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0) - // CHECK-NEXT: [[IMAG:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1) - // CHECK-NEXT: store volatile float [[REAL]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0) - // CHECK-NEXT: store volatile float [[IMAG]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1) + // CHECK: [[REAL:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4 + // CHECK-NEXT: [[IMAG:%.*]] = load volatile float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1), align 4 + // CHECK-NEXT: store volatile float [[REAL]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 0), align 4 + // CHECK-NEXT: store volatile float [[IMAG]], float* getelementptr inbounds ({{.*}} @test1_v, i32 0, i32 1), align 4 // CHECK-NEXT: ret void extern volatile _Complex float test1_v; test1_v = test1_v; |