summaryrefslogtreecommitdiff
path: root/test/Assembler
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-08 06:17:15 +0000
committerChris Lattner <sabre@nondot.org>2004-03-08 06:17:15 +0000
commit3c6d4b4f81f434c2f7524b15baf7795d6ee7f5d9 (patch)
treeae36a7b5b639a88bf0f6223fee82b9f286259d33 /test/Assembler
parent2c56b55cf054f472ff644d15e4a7a7974bd1dab3 (diff)
downloadllvm-3c6d4b4f81f434c2f7524b15baf7795d6ee7f5d9.tar.gz
llvm-3c6d4b4f81f434c2f7524b15baf7795d6ee7f5d9.tar.bz2
llvm-3c6d4b4f81f434c2f7524b15baf7795d6ee7f5d9.tar.xz
New testcase for folding in some important situations. The first two
come up a lot in the code generated by the C++ front-end for pointers to member functions. See PR166. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12217 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler')
-rw-r--r--test/Assembler/2004-03-07-FunctionAddressAlignment.llx15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Assembler/2004-03-07-FunctionAddressAlignment.llx b/test/Assembler/2004-03-07-FunctionAddressAlignment.llx
new file mode 100644
index 0000000000..13f7392c9f
--- /dev/null
+++ b/test/Assembler/2004-03-07-FunctionAddressAlignment.llx
@@ -0,0 +1,15 @@
+; RUN: llvm-as < %s | llvm-dis | not grep cast
+; All of these should be eliminable
+
+
+int %foo() {
+ ret int and (int cast (int()* %foo to int), int 1)
+}
+
+int %foo2() {
+ ret int and (int 1, int cast (int()* %foo2 to int))
+}
+
+bool %foo3() {
+ ret bool cast (bool()* %foo3 to bool)
+}