mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-13 06:25:02 +00:00
9 lines
251 B
LLVM
9 lines
251 B
LLVM
|
; test that casted mallocs get converted to malloc of the right type
|
||
|
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep bitcast
|
||
|
|
||
|
int* %test(uint %size) {
|
||
|
%X = malloc long, uint %size
|
||
|
%ret = bitcast long* %X to int*
|
||
|
ret int* %ret
|
||
|
}
|