OLD | NEW |
| (Empty) |
1 ; Trivial test of the use of internal versus external global | |
2 ; variables. | |
3 | |
4 ; TODO(kschimpf) find out why lc2i is needed. | |
5 ; REQUIRES: allow_llvm_ir_as_input | |
6 ; RUN: %lc2i -i %s --args --verbose inst | %iflc FileCheck %s | |
7 ; RUN: %lc2i -i %s --args --verbose none | FileCheck --check-prefix=ERRORS %s | |
8 | |
9 ; Note: PNaCl ABI Doesn't allow external globals. Hence, not tested. | |
10 @intern_global = internal global [4 x i8] c"\00\00\00\0C", align 4 | |
11 | |
12 define i32 @test_intern_global() { | |
13 ; CHECK: define i32 @test_intern_global | |
14 entry: | |
15 %__1 = bitcast [4 x i8]* @intern_global to i32* | |
16 %v0 = load i32* %__1, align 1 | |
17 ret i32 %v0 | |
18 } | |
19 | |
20 ; ERRORS-NOT: ICE translation error | |
OLD | NEW |