blob: b31b94a9dc9148e51887d287dd8b37fd87b891a7 [file] [log] [blame]
Nick Lewycky6cf73492009-11-08 01:04:45 +00001; RUN: llvm-as < %s | lli -force-interpreter
Nick Lewyckydbf6f512009-11-08 00:45:29 +00002; 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}