xref: /llvm-project/llvm/test/CodeGen/X86/tail-call-casts.ll (revision 78be5aebaaf068e2a1496ff885eb1281c3fafb6a)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2; RUN: llc -mtriple=i686-unknown-linux-gnu -o - %s | FileCheck %s
3
4declare void @g_bool(i1 zeroext)
5
6; Forwarding a bool in a tail call works.
7define void @f_bool(i1 zeroext %x) {
8; CHECK-LABEL: f_bool:
9; CHECK:       # %bb.0: # %entry
10; CHECK-NEXT:    jmp g_bool@PLT # TAILCALL
11entry:
12  tail call void @g_bool(i1 zeroext %x)
13  ret void
14}
15
16
17declare void @g_float(float)
18
19; Forwarding a bitcasted value works too.
20define void @f_i32(i32 %x) {
21; CHECK-LABEL: f_i32:
22; CHECK:       # %bb.0: # %entry
23; CHECK-NEXT:    jmp g_float@PLT # TAILCALL
24entry:
25  %0 = bitcast i32 %x to float
26  tail call void @g_float(float %0)
27  ret void
28}
29