Nick Lewycky | dbf6f51 | 2009-11-08 00:45:29 +0000 | [diff] [blame^] | 1 | ; 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 | |||||
5 | define void @zero(i8 zeroext %foo) { | ||||
6 | zext i8 %foo to i32 | ||||
7 | ret void | ||||
8 | } | ||||
9 | |||||
10 | define void @sign(i8 signext %foo) { | ||||
11 | sext i8 %foo to i32 | ||||
12 | ret void | ||||
13 | } | ||||
14 | |||||
15 | define i32 @main() { | ||||
16 | call void @zero(i8 0) | ||||
17 | call void @sign(i8 0) | ||||
18 | ret i32 0 | ||||
19 | } |