1 ; this testcase is distilled from this C source:
2 ; int *foo(unsigned N, unsigned M) {
3 ; unsigned i = (N+1)*sizeof(int);
4 ; unsigned j = (M+1)*sizeof(int);
5 ; return (int*)malloc(i+j);
8 ; RUN: if as < %s | opt -raise | dis | grep ' cast ' | grep '*'
15 declare sbyte* "malloc"(uint)
17 int* "test"(uint %N, uint %M)
20 %reg111 = shl uint %N, ubyte 2 ; <uint> [#uses=1]
21 %reg109 = add uint %reg111, 4 ; <uint> [#uses=1]
22 %reg114 = shl uint %M, ubyte 2 ; <uint> [#uses=1]
23 %reg112 = add uint %reg114, 4 ; <uint> [#uses=1]
24 %reg116 = add uint %reg109, %reg112 ; <uint> [#uses=1]
25 %reg117 = malloc sbyte, uint %reg116 ; <sbyte*> [#uses=1]
26 %cast221 = cast sbyte* %reg117 to int* ; <int*> [#uses=1]