brintos

brintos / llvm-project-archived public Read only

0
0
Text · 874 B · 73ce3b7 Raw
41 lines · plain
1; RUN: llc -mtriple=i686-unknown-linux-gnu -o - %s | FileCheck %s2 3declare void @f(i16 signext)4declare void @g(i32 signext)5 6 7define void @flags_match(i16 signext %x) {8entry:9  tail call void @f(i16 signext %x)10  ret void11 12; The parameter flags match; do the tail call.13; CHECK-LABEL: flags_match:14; CHECK: jmp f15}16 17define void @flags_mismatch(i16 zeroext %x) {18entry:19  tail call void @f(i16 signext %x)20  ret void21 22; The parameter flags mismatch. %x has not been sign-extended,23; so tail call is not possible.24; CHECK-LABEL: flags_mismatch:25; CHECK: movswl26; CHECK: calll f27}28 29 30define void @mismatch_doesnt_matter(i32 zeroext %x) {31entry:32  tail call void @g(i32 signext %x)33  ret void34 35; The parameter flags mismatch, but the type is wide enough that36; no extension takes place in practice, so do the tail call.37 38; CHECK-LABEL: mismatch_doesnt_matter:39; CHECK: jmp g40}41