summaryrefslogtreecommitdiffstats
path: root/llvm/test/Feature/alignment.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-11-05 22:07:30 +0000
committerChris Lattner <sabre@nondot.org>2005-11-05 22:07:30 +0000
commit6ce0ad3f74b31b96a06531df590cdf178c8e40b5 (patch)
treede895fc6012bec97238a89f978771e4c602973d7 /llvm/test/Feature/alignment.ll
parentd775e1837fe7a76d3c6d8adc00cc34174f839c06 (diff)
downloadbcm5719-llvm-6ce0ad3f74b31b96a06531df590cdf178c8e40b5.tar.gz
bcm5719-llvm-6ce0ad3f74b31b96a06531df590cdf178c8e40b5.zip
new testcase
llvm-svn: 24202
Diffstat (limited to 'llvm/test/Feature/alignment.ll')
-rw-r--r--llvm/test/Feature/alignment.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/llvm/test/Feature/alignment.ll b/llvm/test/Feature/alignment.ll
new file mode 100644
index 00000000000..0a63675bd0d
--- /dev/null
+++ b/llvm/test/Feature/alignment.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
+; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
+; RUN: diff %t1.ll %t2.ll
+
+int *%test() {
+ %X = alloca int, align 4
+ %Y = alloca int, uint 42, align 16
+ %Z = alloca int, align 0
+ ret int *%X
+}
+
+int *%test2() {
+ %X = malloc int, align 4
+ %Y = malloc int, uint 42, align 16
+ %Z = malloc int, align 0
+ ret int *%X
+}
OpenPOWER on IntegriCloud