summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2015-03-08 21:53:59 +0000
committerOwen Anderson <resistor@mac.com>2015-03-08 21:53:59 +0000
commitc03496d4d02ee1d560a80c323e5bbef7b3bd7320 (patch)
treea3db4dd61c103b6e964a3e3d7dd63d2e0f767505 /test
parent692f7382b5d50099a6112ac2d11f769d9589422a (diff)
Teach DataLayout to infer a plausible alignment for things even when nothing is specified by the user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231613 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/default-alignment.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/default-alignment.ll b/test/Transforms/InstCombine/default-alignment.ll
new file mode 100644
index 00000000000..718da213671
--- /dev/null
+++ b/test/Transforms/InstCombine/default-alignment.ll
@@ -0,0 +1,10 @@
+; RUN: opt -verify -instcombine < %s
+%Foo = type <{ i8, x86_fp80 }>
+
+define i8 @t(%Foo* %arg) {
+entry:
+ %0 = getelementptr %Foo, %Foo* %arg, i32 0, i32 0
+ %1 = load i8, i8* %0, align 1
+ ret i8 %1
+}
+