Benjamin Kramer | aa9e4a5 | 2012-03-28 14:50:09 +0000 | [diff] [blame] | 1 | ; RUN: opt < %s -S -globalopt | FileCheck %s |
| 2 | |
| 3 | @zero = internal global [10 x i32] zeroinitializer |
| 4 | |
| 5 | define i32 @test1(i64 %idx) nounwind { |
David Blaikie | 79e6c74 | 2015-02-27 19:29:02 +0000 | [diff] [blame] | 6 | %arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* @zero, i64 0, i64 %idx |
David Blaikie | a79ac14 | 2015-02-27 21:17:42 +0000 | [diff] [blame] | 7 | %l = load i32, i32* %arrayidx |
Benjamin Kramer | aa9e4a5 | 2012-03-28 14:50:09 +0000 | [diff] [blame] | 8 | ret i32 %l |
Stephen Lin | c1c7a13 | 2013-07-14 01:42:54 +0000 | [diff] [blame] | 9 | ; CHECK-LABEL: @test1( |
Benjamin Kramer | aa9e4a5 | 2012-03-28 14:50:09 +0000 | [diff] [blame] | 10 | ; CHECK: ret i32 0 |
| 11 | } |