35 lines · plain
1; RUN: llc --code-model=kernel < %s -asm-verbose=0 | FileCheck %s2 3target triple = "x86_64-unknown-linux-gnu"4 5; CHECK-LABEL: func_no_abs_sym6define i64 @func_no_abs_sym() nounwind {7 ; CHECK: movq $no_abs_sym, %rax8 %1 = ptrtoint ptr @no_abs_sym to i649 ret i64 %110}11 12; CHECK-LABEL: func_abs_sym13define i64 @func_abs_sym() nounwind {14 ; CHECK: movabsq $abs_sym, %rax15 %1 = ptrtoint ptr @abs_sym to i6416 ret i64 %117}18 19; CHECK-LABEL: func_abs_sym_in_range20define i64 @func_abs_sym_in_range() nounwind {21 ;; The absolute_symbol range fits in 32 bits but we still use movabs22 ;; since there's no benefit to using the sign extending instruction23 ;; with absolute symbols.24 ; CHECK: movabsq $abs_sym_in_range, %rax25 %1 = ptrtoint ptr @abs_sym_in_range to i6426 ret i64 %127}28 29@no_abs_sym = external hidden global [0 x i8]30@abs_sym = external hidden global [0 x i8], !absolute_symbol !031@abs_sym_in_range = external hidden global [0 x i8], !absolute_symbol !132 33!0 = !{i64 -1, i64 -1} ;; Full range34!1 = !{i64 -2147483648, i64 2147483648} ;; In range35