blob: 48394ddfab425604616a2b89111764a58b2e47fe [file] [log] [blame]
Chris Lattner4d21cb42003-04-17 19:21:22 +00001; This test checks to make sure that constant exprs fold in some simple situations
2
Misha Brukman14285c82003-09-15 20:02:53 +00003; RUN: llvm-as < %s | llvm-dis | not grep cast
Chris Lattner4d21cb42003-04-17 19:21:22 +00004
5%A = global int* cast (sbyte* null to int*) ; Cast null -> fold
6%B = global int** cast (int** %A to int**) ; Cast to same type -> fold
7%C = global int cast (long 42 to int) ; Integral casts
8%D = global int* cast(float* cast (int* %C to float*) to int*) ; cast of cast ptr->ptr
9%E = global int cast(float* cast (sbyte 5 to float*) to int) ; int -> ptr -> int
10
11; Test folding of binary instrs
12%F = global int* cast(int add (int 5, int -5) to int*)
13%G = global int* cast(int sub (int 5, int 5) to int*)
14