It's not necessary to do rounding for alloca operations when the requested
alignment is equal to the stack alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40004 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Archive/GNU.a b/test/Archive/GNU.a
new file mode 100644
index 0000000..4c09881
--- /dev/null
+++ b/test/Archive/GNU.a
Binary files differ
diff --git a/test/Archive/GNU.toc b/test/Archive/GNU.toc
new file mode 100644
index 0000000..d993413
--- /dev/null
+++ b/test/Archive/GNU.toc
@@ -0,0 +1,4 @@
+evenlen
+oddlen
+very_long_bytecode_file_name.bc
+IsNAN.o
diff --git a/test/Archive/IsNAN.o b/test/Archive/IsNAN.o
new file mode 100644
index 0000000..7b3a12a
--- /dev/null
+++ b/test/Archive/IsNAN.o
Binary files differ
diff --git a/test/Archive/MacOSX.a b/test/Archive/MacOSX.a
new file mode 100644
index 0000000..77f88a2
--- /dev/null
+++ b/test/Archive/MacOSX.a
Binary files differ
diff --git a/test/Archive/MacOSX.toc b/test/Archive/MacOSX.toc
new file mode 100644
index 0000000..61cbd3b
--- /dev/null
+++ b/test/Archive/MacOSX.toc
Binary files differ
diff --git a/test/Archive/README.txt b/test/Archive/README.txt
new file mode 100644
index 0000000..da6cfa4
--- /dev/null
+++ b/test/Archive/README.txt
@@ -0,0 +1,24 @@
+test/Regression/Archive
+=======================
+
+This directory contains various tests of llvm-ar and llvm-ranlib to ensure 
+compatibility reading other ar(1) formats. It also provides a basic
+functionality test for these tools.
+
+There are four archives stored in CVS with these tests: 
+
+GNU.a    - constructed on Linux with GNU ar
+MacOSX.a - constructed on Mac OS X with its native BSD4.4 ar
+SVR4.a   - constructed on Solaris with /usr/ccs/bin/ar
+xpg4.a   - constructed on Solaris with /usr/xpg4/bin/ar
+
+Each type of test is run on each of these archive files.  These archives each 
+contain four members:
+
+oddlen - a member with an odd lengthed name and content
+evenlen - a member with an even lengthed name and content
+IsNAN.o - a Linux native binary
+very_long_bytecode_file_name.bc - LLVM bytecode file with really long name
+
+These files test different aspects of the archiver that should cause failures
+in llvm-ar if regressions are introduced.
diff --git a/test/Archive/SVR4.a b/test/Archive/SVR4.a
new file mode 100644
index 0000000..3947813
--- /dev/null
+++ b/test/Archive/SVR4.a
Binary files differ
diff --git a/test/Archive/SVR4.toc b/test/Archive/SVR4.toc
new file mode 100644
index 0000000..d993413
--- /dev/null
+++ b/test/Archive/SVR4.toc
@@ -0,0 +1,4 @@
+evenlen
+oddlen
+very_long_bytecode_file_name.bc
+IsNAN.o
diff --git a/test/Archive/dg.exp b/test/Archive/dg.exp
new file mode 100644
index 0000000..879685c
--- /dev/null
+++ b/test/Archive/dg.exp
@@ -0,0 +1,3 @@
+load_lib llvm.exp
+
+RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,llx,c,cpp,tr}]]
diff --git a/test/Archive/evenlen b/test/Archive/evenlen
new file mode 100644
index 0000000..59ee8d5
--- /dev/null
+++ b/test/Archive/evenlen
@@ -0,0 +1 @@
+evenlen
diff --git a/test/Archive/extract_GNU.ll b/test/Archive/extract_GNU.ll
new file mode 100644
index 0000000..f19840a
--- /dev/null
+++ b/test/Archive/extract_GNU.ll
@@ -0,0 +1,5 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can extract bytecode members
+;from GNU style archives
+;RUN: llvm-ar x %p/GNU.a very_long_bytecode_file_name.bc
+;RUN: diff %p/very_long_bytecode_file_name.bc very_long_bytecode_file_name.bc >/dev/null 2>/dev/null
diff --git a/test/Archive/extract_MacOSX.ll b/test/Archive/extract_MacOSX.ll
new file mode 100644
index 0000000..c811a59
--- /dev/null
+++ b/test/Archive/extract_MacOSX.ll
@@ -0,0 +1,6 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can extract bytecode members
+;from MacOSX style archives
+
+;RUN: llvm-ar x %p/MacOSX.a very_long_bytecode_file_name.bc
+;RUN: diff %p/very_long_bytecode_file_name.bc very_long_bytecode_file_name.bc > /dev/null 2>/dev/null
diff --git a/test/Archive/extract_SVR4.ll b/test/Archive/extract_SVR4.ll
new file mode 100644
index 0000000..446d52c
--- /dev/null
+++ b/test/Archive/extract_SVR4.ll
@@ -0,0 +1,6 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can extract bytecode members
+;from SVR4 style archives
+
+;RUN: llvm-ar x %p/SVR4.a very_long_bytecode_file_name.bc
+;RUN: diff %p/very_long_bytecode_file_name.bc very_long_bytecode_file_name.bc >/dev/null 2>/dev/null
diff --git a/test/Archive/extract_xpg4.ll b/test/Archive/extract_xpg4.ll
new file mode 100644
index 0000000..c816d91
--- /dev/null
+++ b/test/Archive/extract_xpg4.ll
@@ -0,0 +1,6 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can extract bytecode members
+;from xpg4 style archives
+
+;RUN: llvm-ar x %p/xpg4.a very_long_bytecode_file_name.bc
+;RUN: diff %p/very_long_bytecode_file_name.bc very_long_bytecode_file_name.bc >/dev/null 2>/dev/null
diff --git a/test/Archive/oddlen b/test/Archive/oddlen
new file mode 100644
index 0000000..8cf5bd1
--- /dev/null
+++ b/test/Archive/oddlen
@@ -0,0 +1 @@
+oddlen
diff --git a/test/Archive/toc_GNU.ll b/test/Archive/toc_GNU.ll
new file mode 100644
index 0000000..136f603
--- /dev/null
+++ b/test/Archive/toc_GNU.ll
@@ -0,0 +1,5 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;GNU style archives
+;RUN: llvm-ar t %p/GNU.a > %t1
+;RUN: diff %t1 %p/GNU.toc
diff --git a/test/Archive/toc_MacOSX.ll b/test/Archive/toc_MacOSX.ll
new file mode 100644
index 0000000..fb03223
--- /dev/null
+++ b/test/Archive/toc_MacOSX.ll
@@ -0,0 +1,5 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;MacOSX style archives
+;RUN: llvm-ar t %p/MacOSX.a > %t1
+;RUN: diff %t1 %p/MacOSX.toc
diff --git a/test/Archive/toc_SVR4.ll b/test/Archive/toc_SVR4.ll
new file mode 100644
index 0000000..930a26f
--- /dev/null
+++ b/test/Archive/toc_SVR4.ll
@@ -0,0 +1,5 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;SVR4 style archives
+;RUN: llvm-ar t %p/SVR4.a > %t1
+;RUN: diff %t1 %p/SVR4.toc
diff --git a/test/Archive/toc_xpg4.ll b/test/Archive/toc_xpg4.ll
new file mode 100644
index 0000000..441af03
--- /dev/null
+++ b/test/Archive/toc_xpg4.ll
@@ -0,0 +1,5 @@
+;This isn't really an assembly file, its just here to run the test.
+;This test just makes sure that llvm-ar can generate a table of contents for
+;xpg4 style archives
+;RUN: llvm-ar t %p/xpg4.a > %t1
+;RUN: diff %t1 %p/xpg4.toc
diff --git a/test/Archive/very_long_bytecode_file_name.bc b/test/Archive/very_long_bytecode_file_name.bc
new file mode 100755
index 0000000..f7fce24
--- /dev/null
+++ b/test/Archive/very_long_bytecode_file_name.bc
Binary files differ
diff --git a/test/Archive/xpg4.a b/test/Archive/xpg4.a
new file mode 100644
index 0000000..b2bdb51
--- /dev/null
+++ b/test/Archive/xpg4.a
Binary files differ
diff --git a/test/Archive/xpg4.toc b/test/Archive/xpg4.toc
new file mode 100644
index 0000000..d993413
--- /dev/null
+++ b/test/Archive/xpg4.toc
@@ -0,0 +1,4 @@
+evenlen
+oddlen
+very_long_bytecode_file_name.bc
+IsNAN.o