summaryrefslogtreecommitdiff
path: root/test/Assembler/2007-07-30-AutoUpgradeZextSext.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Assembler/2007-07-30-AutoUpgradeZextSext.ll')
-rw-r--r--test/Assembler/2007-07-30-AutoUpgradeZextSext.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Assembler/2007-07-30-AutoUpgradeZextSext.ll b/test/Assembler/2007-07-30-AutoUpgradeZextSext.ll
new file mode 100644
index 0000000000..ea2db4414f
--- /dev/null
+++ b/test/Assembler/2007-07-30-AutoUpgradeZextSext.ll
@@ -0,0 +1,12 @@
+; Test that upgrading zext/sext attributes to zeroext and signext
+; works correctly.
+; PR1553
+; RUN: llvm-as < %s > /dev/null
+
+define i32 @bar() {
+ %t = call i8 @foo( i8 10 sext ) zext
+ %x = zext i8 %t to i32
+ ret i32 %x
+}
+
+declare i8 @foo(i8 signext ) zeroext