Chris Lattner | bb99fc4 | 2004-10-08 17:29:47 +0000 | [diff] [blame^] | 1 | ; RUN: llvm-as < %s | opt -globalopt | llvm-dis | not grep global |
| 2 | |
| 3 | %G = internal global { int, float, {double} } { int 1, float 1.0, {double} {double 17.27} } |
| 4 | |
| 5 | void %onlystore() { |
| 6 | store int 123, int* getelementptr ({ int, float, {double} }* %G, int 0, uint 0) |
| 7 | ret void |
| 8 | } |
| 9 | |
| 10 | float %storeinit() { |
| 11 | store float 1.0, float* getelementptr ({ int, float, {double} }* %G, int 0, uint 1) |
| 12 | %X = load float* getelementptr ({ int, float, {double} }* %G, int 0, uint 1) |
| 13 | ret float %X |
| 14 | } |
| 15 | |
| 16 | double %constantize() { |
| 17 | %X = load double* getelementptr ({ int, float, {double} }* %G, int 0, uint 2, uint 0) |
| 18 | ret double %X |
| 19 | } |