Add a priority queue class, which is a wrapper around std::priority_queue
[oota-llvm.git] / test / Transforms / InstCombine / cast-malloc.ll
1 ; test that casted mallocs get converted to malloc of the right type
2 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | \
3 ; RUN:    not grep bitcast
4
5 ; The target datalayout is important for this test case. We have to tell 
6 ; instcombine that the ABI alignment for a long is 4-bytes, not 8, otherwise
7 ; it won't do the transform.
8 target datalayout = "e-i64:32:64"
9
10 define i32* @test(i32 %size) {
11         %X = malloc i64, i32 %size              ; <i64*> [#uses=1]
12         %ret = bitcast i64* %X to i32*          ; <i32*> [#uses=1]
13         ret i32* %ret
14 }
15