From be3a169d1819868d673e32b18b27f9254214aeaa Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 8 Mar 2004 06:17:15 +0000 Subject: [PATCH] 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. llvm-svn: 12217 --- .../2004-03-07-FunctionAddressAlignment.llx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 llvm/test/Regression/Assembler/2004-03-07-FunctionAddressAlignment.llx diff --git a/llvm/test/Regression/Assembler/2004-03-07-FunctionAddressAlignment.llx b/llvm/test/Regression/Assembler/2004-03-07-FunctionAddressAlignment.llx new file mode 100644 index 000000000000..13f7392c9f36 --- /dev/null +++ b/llvm/test/Regression/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) +}