2002-11-05 00:18:07 +08:00
|
|
|
; test that malloc's with a constant argument are promoted to array allocations
|
2007-04-07 02:56:54 +08:00
|
|
|
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep getelementptr
|
2002-11-05 00:18:07 +08:00
|
|
|
|
2007-04-07 02:56:54 +08:00
|
|
|
define i32* @test() {
|
|
|
|
%X = malloc i32, i32 4
|
|
|
|
ret i32* %X
|
2002-11-05 00:18:07 +08:00
|
|
|
}
|