mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
2540538e40
The code was previously not able to track a boolean argument at a call site back to the formal argument of the caller. Differential Revision: http://reviews.llvm.org/D17786 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@262575 91177308-0d34-0410-b5e6-96231b3b80d8
28 lines
566 B
LLVM
28 lines
566 B
LLVM
; RUN: llc -mtriple=i686-unknown-linux-gnu -o - %s | FileCheck %s
|
|
|
|
declare void @g_bool(i1 zeroext)
|
|
define void @f_bool(i1 zeroext %x) {
|
|
entry:
|
|
tail call void @g_bool(i1 zeroext %x)
|
|
ret void
|
|
|
|
; Forwarding a bool in a tail call works.
|
|
; CHECK-LABEL: f_bool:
|
|
; CHECK-NOT: movz
|
|
; CHECK: jmp g_bool
|
|
}
|
|
|
|
|
|
declare void @g_float(float)
|
|
define void @f_i32(i32 %x) {
|
|
entry:
|
|
%0 = bitcast i32 %x to float
|
|
tail call void @g_float(float %0)
|
|
ret void
|
|
|
|
; Forwarding a bitcasted value works too.
|
|
; CHECK-LABEL: f_i32
|
|
; CHECK-NOT: mov
|
|
; CHECK: jmp g_float
|
|
}
|