llvm-project/llvm/test/CodeGen/X86/large-pic-string.ll

22 lines
742 B
LLVM
Raw Normal View History

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -verify-machineinstrs < %s -code-model=large -relocation-model=pic -mtriple=x86_64--linux | FileCheck %s
@.str = private unnamed_addr constant [2 x i8] c"a\00", align 1
define void @pr38385() {
; CHECK-LABEL: pr38385:
; CHECK: # %bb.0:
; CHECK-NEXT: .L0$pb:
; CHECK-NEXT: leaq .L0${{.*}}(%rip), %rax
; CHECK-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L0$pb, %rcx
; CHECK-NEXT: addq %rax, %rcx
; CHECK-NEXT: movabsq $.L.str@GOTOFF, %rax
; CHECK-NEXT: addl %eax, %ecx
; CHECK-NEXT: movb %cl, -{{[0-9]+}}(%rsp)
; CHECK-NEXT: retq
%p = alloca i8, align 1
store i8 ptrtoint ([2 x i8]* @.str to i8), i8* %p, align 1
ret void
}