aboutsummaryrefslogtreecommitdiffstats
path: root/test/ExecutionEngine/interpreter-ext.ll
blob: b31b94a9dc9148e51887d287dd8b37fd87b891a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
; RUN: llvm-as < %s | 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
}