Dan Gohman | 0f3ef7be | 2009-09-11 18:17:12 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -sccp -S | not grep load |
Reid Spencer | 9f9fe70 | 2007-04-13 22:33:10 +0000 | [diff] [blame] | 2 | |
| 3 | @Y = constant [6 x i101] [ i101 12, i101 123456789000000, i101 -12, |
| 4 | i101 -123456789000000, i101 0,i101 9123456789000000] |
| 5 | |
| 6 | define i101 @array() |
| 7 | { |
| 8 | Head: |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 9 | %A = getelementptr [6 x i101], [6 x i101]* @Y, i32 0, i32 1 |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 10 | %B = load i101, i101* %A |
Reid Spencer | 9f9fe70 | 2007-04-13 22:33:10 +0000 | [diff] [blame] | 11 | %D = and i101 %B, 1 |
| 12 | %DD = or i101 %D, 1 |
| 13 | %E = trunc i101 %DD to i32 |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 14 | %F = getelementptr [6 x i101], [6 x i101]* @Y, i32 0, i32 %E |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 15 | %G = load i101, i101* %F |
Reid Spencer | 9f9fe70 | 2007-04-13 22:33:10 +0000 | [diff] [blame] | 16 | |
| 17 | ret i101 %G |
| 18 | } |