diff options
| author | Bill Wendling <isanbard@gmail.com> | 2012-03-16 07:40:08 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2012-03-16 07:40:08 +0000 |
| commit | a2a26b546c488b83b6c1e3955ebae941fb48b2d0 (patch) | |
| tree | 57b35b41ecb519f03869381cd6c1cdc98d5e22d8 /llvm/test | |
| parent | 501d95c176df9e09ad0800bda598e63f7050a951 (diff) | |
| download | bcm5719-llvm-a2a26b546c488b83b6c1e3955ebae941fb48b2d0.tar.gz bcm5719-llvm-a2a26b546c488b83b6c1e3955ebae941fb48b2d0.zip | |
The alignment of the pointer part of the store instruction may have an
alignment. If that's the case, then we want to make sure that we don't increase
the alignment of the store instruction. Because if we increase it to be "more
aligned" than the pointer, code-gen may use instructions which require a greater
alignment than the pointer guarantees.
<rdar://problem/11043589>
llvm-svn: 152907
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/2012-03-16-StoreAlignment.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/2012-03-16-StoreAlignment.ll b/llvm/test/Transforms/InstCombine/2012-03-16-StoreAlignment.ll new file mode 100644 index 00000000000..7f05a89c505 --- /dev/null +++ b/llvm/test/Transforms/InstCombine/2012-03-16-StoreAlignment.ll @@ -0,0 +1,12 @@ +; RUN: opt < %s -S -instcombine | FileCheck %s +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" + +%0 = type { i32, i8, i8, i8 } + +@G = external hidden global %0, align 4 + +define void @f1(i64 %a1) nounwind ssp align 2 { +; CHECK: store i64 %a1, i64* bitcast (%0* @G to i64*), align 4 + store i64 %a1, i64* bitcast (%0* @G to i64*) + ret void +} |

