aboutsummaryrefslogtreecommitdiffstats
path: root/test/Assembler
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-25 06:36:36 +0000
committerChris Lattner <sabre@nondot.org>2009-03-25 06:36:36 +0000
commitad9ad7c827b585c018288c89d611d8c97d8d2e7d (patch)
tree7f0dc1b1b1007c1e30b9634f8a90a4e9feb9e767 /test/Assembler
parent0c8f7dc67cebcb1eef5984baaa4802cb46f72797 (diff)
downloadexternal_llvm-ad9ad7c827b585c018288c89d611d8c97d8d2e7d.zip
external_llvm-ad9ad7c827b585c018288c89d611d8c97d8d2e7d.tar.gz
external_llvm-ad9ad7c827b585c018288c89d611d8c97d8d2e7d.tar.bz2
Fix a bug in our autoupgrade support: in an argument list to a function
call, we should treat "i64 zext" as the start of a constant expr, but "i64 0 zext" as an argument with an obsolete attribute on it (this form is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll). Make the autoupgrade logic more discerning to avoid treating "i64 zext" as an old-style attribute, causing us to reject a valid constant expr. This fixes PR3876. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler')
-rw-r--r--test/Assembler/2009-03-24-ZextConstantExpr.ll11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/Assembler/2009-03-24-ZextConstantExpr.ll b/test/Assembler/2009-03-24-ZextConstantExpr.ll
new file mode 100644
index 0000000..daedb95
--- /dev/null
+++ b/test/Assembler/2009-03-24-ZextConstantExpr.ll
@@ -0,0 +1,11 @@
+; RUN: llvm-as < %s | llvm-dis
+; PR3876
+@gdtr = external global [0 x i8]
+
+define void @test() {
+ call zeroext i1 @paging_map(i64 zext (i32 and (i32 ptrtoint ([0 x i8]* @gdtr to i32), i32 -4096) to i64))
+ ret void
+}
+
+declare zeroext i1 @paging_map(i64)
+