blob: 4aef45a07647947744640c9844603c2f946d598b [file] [log] [blame]
Nick Lewyckydbf6f512009-11-08 00:45:29 +00001; RUN: lli -force-interpreter
2; Extending a value due to zeroext/signext will leave it the wrong size
3; causing problems later, such as a crash if you try to extend it again.
4
5define void @zero(i8 zeroext %foo) {
6 zext i8 %foo to i32
7 ret void
8}
9
10define void @sign(i8 signext %foo) {
11 sext i8 %foo to i32
12 ret void
13}
14
15define i32 @main() {
16 call void @zero(i8 0)
17 call void @sign(i8 0)
18 ret i32 0
19}