61 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=x86_64-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X643; RUN: llc -mtriple=x86_64-apple-darwin -global-isel -verify-machineinstrs -relocation-model=pic < %s -o - | FileCheck %s --check-prefix=X64_DARWIN_PIC4; RUN: llc -mtriple=i386-linux-gnu -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X325; RUN: llc -mtriple=x86_64-linux-gnux32 -global-isel -verify-machineinstrs < %s -o - | FileCheck %s --check-prefix=X32ABI6 7@g_int = dso_local global i32 0, align 48 9; Function Attrs: noinline nounwind optnone uwtable10define dso_local ptr @test_global_ptrv() #3 {11; X64-LABEL: test_global_ptrv:12; X64: # %bb.0: # %entry13; X64-NEXT: leaq g_int, %rax14; X64-NEXT: retq15;16; X64_DARWIN_PIC-LABEL: test_global_ptrv:17; X64_DARWIN_PIC: ## %bb.0: ## %entry18; X64_DARWIN_PIC-NEXT: leaq _g_int(%rip), %rax19; X64_DARWIN_PIC-NEXT: retq20;21; X32-LABEL: test_global_ptrv:22; X32: # %bb.0: # %entry23; X32-NEXT: leal g_int, %eax24; X32-NEXT: retl25;26; X32ABI-LABEL: test_global_ptrv:27; X32ABI: # %bb.0: # %entry28; X32ABI-NEXT: leal g_int, %eax29; X32ABI-NEXT: movl %eax, %eax30; X32ABI-NEXT: retq31entry:32 ret ptr @g_int33}34 35; Function Attrs: noinline nounwind optnone uwtable36define dso_local i32 @test_global_valv() #3 {37; X64-LABEL: test_global_valv:38; X64: # %bb.0: # %entry39; X64-NEXT: movl g_int, %eax40; X64-NEXT: retq41;42; X64_DARWIN_PIC-LABEL: test_global_valv:43; X64_DARWIN_PIC: ## %bb.0: ## %entry44; X64_DARWIN_PIC-NEXT: movl _g_int(%rip), %eax45; X64_DARWIN_PIC-NEXT: retq46;47; X32-LABEL: test_global_valv:48; X32: # %bb.0: # %entry49; X32-NEXT: movl g_int, %eax50; X32-NEXT: retl51;52; X32ABI-LABEL: test_global_valv:53; X32ABI: # %bb.0: # %entry54; X32ABI-NEXT: movl g_int, %eax55; X32ABI-NEXT: retq56entry:57 %0 = load i32, ptr @g_int, align 458 ret i32 %059}60 61