Nadav Rotem | a069c6c | 2011-04-05 14:29:52 +0000 | [diff] [blame^] | 1 | ; RUN: opt < %s -instcombine -S |
| 2 | |
| 3 | %myStruct = type { float, [3 x float], [4 x float], i32 } |
| 4 | |
| 5 | ; make sure that we are not crashing when creating an illegal type |
| 6 | define void @func(%myStruct addrspace(1)* nocapture %p) nounwind { |
| 7 | ST: |
| 8 | %A = getelementptr inbounds %myStruct addrspace(1)* %p, i64 0 |
| 9 | %B = bitcast %myStruct addrspace(1)* %A to %myStruct* |
| 10 | %C = getelementptr inbounds %myStruct* %B, i32 0, i32 1 |
| 11 | %D = getelementptr inbounds [3 x float]* %C, i32 0, i32 2 |
| 12 | %E = load float* %D, align 4 |
| 13 | %F = fsub float %E, undef |
| 14 | ret void |
| 15 | } |
| 16 | |