llvm-6502/test/Transforms/InstCombine/cast-malloc.ll
2006-12-02 04:23:10 +00:00

9 lines
266 B
LLVM

; test that casted mallocs get converted to malloc of the right type
; RUN: llvm-upgrade < %s | llvm-as | 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
}