Index: tests_lit/llvm2ice_tests/global.ll |
diff --git a/tests_lit/llvm2ice_tests/global.ll b/tests_lit/llvm2ice_tests/global.ll |
new file mode 100644 |
index 0000000000000000000000000000000000000000..22dbad4ff5a158fa3e1fd280995fa6ffe01f4543 |
--- /dev/null |
+++ b/tests_lit/llvm2ice_tests/global.ll |
@@ -0,0 +1,23 @@ |
+; RUIN: %llvm2ice -verbose inst %s | FileCheck %s |
+; RUIN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
+; RUN: %szdiff --llvm2ice=%llvm2ice %s | FileCheck --check-prefix=DUMP %s |
+ |
+@intern_global = global i32 12, align 4 |
+@extern_global = external global i32 |
+ |
+define i32 @test_intern_global() { |
+; CHECK: define i32 @test_intern_global |
+entry: |
+ %v0 = load i32* @intern_global, align 1 |
+ ret i32 %v0 |
+} |
+ |
+define i32 @test_extern_global() { |
+; CHECK: define i32 @test_extern_global |
+entry: |
+ %v0 = load i32* @extern_global, align 1 |
+ ret i32 %v0 |
+} |
+ |
+; ERRORS-NOT: ICE translation error |
+; DUMP-NOT: SZ |