llvm/llvm/test/CodeGen/X86/tail-call-casts.ll

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc -mtriple=i686-unknown-linux-gnu -o - %s | FileCheck %s

declare void @g_bool(i1 zeroext)

; Forwarding a bool in a tail call works.
define void @f_bool(i1 zeroext %x) {
; CHECK-LABEL: f_bool:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    jmp g_bool@PLT # TAILCALL
entry:
  tail call void @g_bool(i1 zeroext %x)
  ret void
}


declare void @g_float(float)

; Forwarding a bitcasted value works too.
define void @f_i32(i32 %x) {
; CHECK-LABEL: f_i32:
; CHECK:       # %bb.0: # %entry
; CHECK-NEXT:    jmp g_float@PLT # TAILCALL
entry:
  %0 = bitcast i32 %x to float
  tail call void @g_float(float %0)
  ret void
}