aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/cast-malloc.ll
blob: 2458bf3ea4423a07fd6acfc1b87cebdf03ba4aa2 (plain)
1
2
3
4
5
6
7
8
; 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
}