Fix the interpreter to not crash due to zeroext/signext

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86428 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nick Lewycky committed 2009-11-08 00:45:29 +00:00
1 parent 36206182e1
commit dbf6f518e9
2 files changed
+19 -10

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
; RUN: lli -force-interpreter
; Extending a value due to zeroext/signext will leave it the wrong size
; causing problems later, such as a crash if you try to extend it again.
define void @zero(i8 zeroext %foo) {
zext i8 %foo to i32
ret void
}
define void @sign(i8 signext %foo) {
sext i8 %foo to i32
ret void
}
define i32 @main() {
call void @zero(i8 0)
call void @sign(i8 0)
ret i32 0
}