mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
a6c3112b1f
is bitcast to return a floating point value. The result of the instruction may not be used by the program afterwards, and LLVM will happily remove all instructions except the call. But, on some platforms, if a value is returned as a floating point, it may need to be removed from the stack (like x87). Thus, we can't get rid of the bitcast even if there isn't a use of the value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51134 91177308-0d34-0410-b5e6-96231b3b80d8
9 lines
254 B
LLVM
9 lines
254 B
LLVM
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep call | notcast
|
|
|
|
declare void @free(i8*)
|
|
|
|
define void @test(i32* %X) {
|
|
call void (...)* bitcast (void (i8*)* @free to void (...)*)( i32* %X ) ; <i32>:1 [#uses=0]
|
|
ret void
|
|
}
|