[llvm] [X86] Respect code models more when determining if a global reference can fit in 32 bits (PR #75386)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 13:45:04 PST 2023
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/75386
>From 55c27af627ce9cf5528b779efdb72e39cbc67a50 Mon Sep 17 00:00:00 2001
From: Arthur Eubanks <aeubanks at google.com>
Date: Wed, 13 Dec 2023 13:28:28 -0800
Subject: [PATCH] [X86] Respect code models more when determining if a global
reference can fit in 32 bits
For non-GlobalValue references, the small and medium code models can use 32 bit constants.
For GlobalValue references, use TargetMachine::isLargeGlobalObject().
Look through aliases for determining if a GlobalValue is small or large.
---
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp | 23 +-
llvm/test/CodeGen/X86/code-model-elf.ll | 293 ++++++++++++++----------
2 files changed, 190 insertions(+), 126 deletions(-)
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 545039b79f1616..238d7edad1fb94 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -2927,6 +2927,10 @@ bool X86DAGToDAGISel::selectAddr(SDNode *Parent, SDValue N, SDValue &Base,
}
bool X86DAGToDAGISel::selectMOV64Imm32(SDValue N, SDValue &Imm) {
+ // Cannot use 32 bit constants to reference objects in kernel code model.
+ if (TM.getCodeModel() == CodeModel::Kernel)
+ return false;
+
// In static codegen with small code model, we can get the address of a label
// into a register with 'movl'
if (N->getOpcode() != X86ISD::Wrapper)
@@ -2940,15 +2944,20 @@ bool X86DAGToDAGISel::selectMOV64Imm32(SDValue N, SDValue &Imm) {
return false;
Imm = N;
- if (N->getOpcode() != ISD::TargetGlobalAddress)
- return TM.getCodeModel() == CodeModel::Small;
+ // Small/medium code model can reference non-TargetGlobalAddress objects with
+ // 32 bit constants.
+ if (N->getOpcode() != ISD::TargetGlobalAddress) {
+ return TM.getCodeModel() == CodeModel::Small ||
+ TM.getCodeModel() == CodeModel::Medium;
+ }
- std::optional<ConstantRange> CR =
- cast<GlobalAddressSDNode>(N)->getGlobal()->getAbsoluteSymbolRange();
- if (!CR)
- return TM.getCodeModel() == CodeModel::Small;
+ const GlobalValue *GV = cast<GlobalAddressSDNode>(N)->getGlobal();
+ if (std::optional<ConstantRange> CR = GV->getAbsoluteSymbolRange())
+ return CR->getUnsignedMax().ult(1ull << 32);
- return CR->getUnsignedMax().ult(1ull << 32);
+ if (auto *GO = GV->getAliaseeObject())
+ return !TM.isLargeGlobalObject(GO);
+ return true;
}
bool X86DAGToDAGISel::selectLEA64_32Addr(SDValue N, SDValue &Base,
diff --git a/llvm/test/CodeGen/X86/code-model-elf.ll b/llvm/test/CodeGen/X86/code-model-elf.ll
index 0f58ccaf298dab..a43736e2a5884a 100644
--- a/llvm/test/CodeGen/X86/code-model-elf.ll
+++ b/llvm/test/CodeGen/X86/code-model-elf.ll
@@ -40,6 +40,7 @@ target triple = "x86_64--linux"
@global_data = dso_local global [10 x i32] [i32 1, i32 2, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0], align 16
@static_data = internal global [10 x i32] zeroinitializer, align 16
+ at static_data_alias = internal constant ptr getelementptr inbounds ([10 x i32], ptr @static_data, i64 0, i64 2), align 8
@extern_data = external global [10 x i32], align 16
@thread_data = external thread_local global i32, align 4
@unknown_size_data = dso_local global [0 x i32] zeroinitializer, align 16
@@ -96,12 +97,67 @@ define dso_local ptr @lea_static_data() #0 {
; LARGE-SMALL-DATA-PIC-NEXT: leaq .L0$pb(%rip), %rax
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L0$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $static_data at GOTOFF, %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movl $static_data at GOTOFF, %eax
; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
; LARGE-SMALL-DATA-PIC-NEXT: retq
ret ptr @static_data
}
+define dso_local ptr @lea_static_data_alias() #0 {
+; SMALL-STATIC-LABEL: lea_static_data_alias:
+; SMALL-STATIC: # %bb.0:
+; SMALL-STATIC-NEXT: movl $static_data_alias, %eax
+; SMALL-STATIC-NEXT: retq
+;
+; MEDIUM-STATIC-LABEL: lea_static_data_alias:
+; MEDIUM-STATIC: # %bb.0:
+; MEDIUM-STATIC-NEXT: movabsq $static_data_alias, %rax
+; MEDIUM-STATIC-NEXT: retq
+;
+; LARGE-STATIC-LABEL: lea_static_data_alias:
+; LARGE-STATIC: # %bb.0:
+; LARGE-STATIC-NEXT: movabsq $static_data_alias, %rax
+; LARGE-STATIC-NEXT: retq
+;
+; SMALL-PIC-LABEL: lea_static_data_alias:
+; SMALL-PIC: # %bb.0:
+; SMALL-PIC-NEXT: leaq static_data_alias(%rip), %rax
+; SMALL-PIC-NEXT: retq
+;
+; MEDIUM-SMALL-DATA-PIC-LABEL: lea_static_data_alias:
+; MEDIUM-SMALL-DATA-PIC: # %bb.0:
+; MEDIUM-SMALL-DATA-PIC-NEXT: leaq static_data_alias(%rip), %rax
+; MEDIUM-SMALL-DATA-PIC-NEXT: retq
+;
+; MEDIUM-PIC-LABEL: lea_static_data_alias:
+; MEDIUM-PIC: # %bb.0:
+; MEDIUM-PIC-NEXT: leaq _GLOBAL_OFFSET_TABLE_(%rip), %rcx
+; MEDIUM-PIC-NEXT: movabsq $static_data_alias at GOTOFF, %rax
+; MEDIUM-PIC-NEXT: addq %rcx, %rax
+; MEDIUM-PIC-NEXT: retq
+;
+; LARGE-PIC-LABEL: lea_static_data_alias:
+; LARGE-PIC: # %bb.0:
+; LARGE-PIC-NEXT: .L1$pb:
+; LARGE-PIC-NEXT: leaq .L1$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L1$pb, %rcx
+; LARGE-PIC-NEXT: addq %rax, %rcx
+; LARGE-PIC-NEXT: movabsq $static_data_alias at GOTOFF, %rax
+; LARGE-PIC-NEXT: addq %rcx, %rax
+; LARGE-PIC-NEXT: retq
+;
+; LARGE-SMALL-DATA-PIC-LABEL: lea_static_data_alias:
+; LARGE-SMALL-DATA-PIC: # %bb.0:
+; LARGE-SMALL-DATA-PIC-NEXT: .L1$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L1$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L1$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: movl $static_data_alias at GOTOFF, %eax
+; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
+; LARGE-SMALL-DATA-PIC-NEXT: retq
+ ret ptr @static_data_alias
+}
+
define dso_local ptr @lea_global_data() #0 {
; SMALL-STATIC-LABEL: lea_global_data:
; SMALL-STATIC: # %bb.0:
@@ -137,9 +193,9 @@ define dso_local ptr @lea_global_data() #0 {
;
; LARGE-PIC-LABEL: lea_global_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L1$pb:
-; LARGE-PIC-NEXT: leaq .L1$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L1$pb, %rcx
+; LARGE-PIC-NEXT: .L2$pb:
+; LARGE-PIC-NEXT: leaq .L2$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L2$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $global_data at GOTOFF, %rax
; LARGE-PIC-NEXT: addq %rcx, %rax
@@ -147,11 +203,11 @@ define dso_local ptr @lea_global_data() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_global_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L1$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L1$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L1$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L2$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L2$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L2$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $global_data at GOTOFF, %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movl $global_data at GOTOFF, %eax
; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
; LARGE-SMALL-DATA-PIC-NEXT: retq
ret ptr @global_data
@@ -190,9 +246,9 @@ define dso_local ptr @lea_extern_data() #0 {
;
; LARGE-PIC-LABEL: lea_extern_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L2$pb:
-; LARGE-PIC-NEXT: leaq .L2$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L2$pb, %rcx
+; LARGE-PIC-NEXT: .L3$pb:
+; LARGE-PIC-NEXT: leaq .L3$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L3$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $extern_data at GOT, %rax
; LARGE-PIC-NEXT: movq (%rcx,%rax), %rax
@@ -200,11 +256,11 @@ define dso_local ptr @lea_extern_data() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_extern_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L2$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L2$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L2$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L3$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L3$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L3$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $extern_data at GOT, %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movl $extern_data at GOT, %eax
; LARGE-SMALL-DATA-PIC-NEXT: movq (%rcx,%rax), %rax
; LARGE-SMALL-DATA-PIC-NEXT: retq
ret ptr @extern_data
@@ -247,9 +303,9 @@ define dso_local ptr @lea_unknown_size_data() #0 {
;
; LARGE-PIC-LABEL: lea_unknown_size_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L3$pb:
-; LARGE-PIC-NEXT: leaq .L3$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L3$pb, %rcx
+; LARGE-PIC-NEXT: .L4$pb:
+; LARGE-PIC-NEXT: leaq .L4$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L4$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $unknown_size_data at GOTOFF, %rax
; LARGE-PIC-NEXT: addq %rcx, %rax
@@ -257,9 +313,9 @@ define dso_local ptr @lea_unknown_size_data() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_unknown_size_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L3$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L3$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L3$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L4$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L4$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L4$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $unknown_size_data at GOTOFF, %rax
; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
@@ -267,7 +323,6 @@ define dso_local ptr @lea_unknown_size_data() #0 {
ret ptr @unknown_size_data
}
-; TODO: make nopic small and medium instruction sequence the same
define dso_local ptr @lea_forced_small_data() #0 {
; SMALL-STATIC-LABEL: lea_forced_small_data:
; SMALL-STATIC: # %bb.0:
@@ -276,12 +331,12 @@ define dso_local ptr @lea_forced_small_data() #0 {
;
; MEDIUM-STATIC-LABEL: lea_forced_small_data:
; MEDIUM-STATIC: # %bb.0:
-; MEDIUM-STATIC-NEXT: movabsq $forced_small_data, %rax
+; MEDIUM-STATIC-NEXT: movl $forced_small_data, %eax
; MEDIUM-STATIC-NEXT: retq
;
; LARGE-STATIC-LABEL: lea_forced_small_data:
; LARGE-STATIC: # %bb.0:
-; LARGE-STATIC-NEXT: movabsq $forced_small_data, %rax
+; LARGE-STATIC-NEXT: movl $forced_small_data, %eax
; LARGE-STATIC-NEXT: retq
;
; SMALL-PIC-LABEL: lea_forced_small_data:
@@ -301,21 +356,21 @@ define dso_local ptr @lea_forced_small_data() #0 {
;
; LARGE-PIC-LABEL: lea_forced_small_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L4$pb:
-; LARGE-PIC-NEXT: leaq .L4$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L4$pb, %rcx
+; LARGE-PIC-NEXT: .L5$pb:
+; LARGE-PIC-NEXT: leaq .L5$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L5$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
-; LARGE-PIC-NEXT: movabsq $forced_small_data at GOTOFF, %rax
+; LARGE-PIC-NEXT: movl $forced_small_data at GOTOFF, %eax
; LARGE-PIC-NEXT: addq %rcx, %rax
; LARGE-PIC-NEXT: retq
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_forced_small_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L4$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L4$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L4$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L5$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L5$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L5$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $forced_small_data at GOTOFF, %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movl $forced_small_data at GOTOFF, %eax
; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
; LARGE-SMALL-DATA-PIC-NEXT: retq
ret ptr @forced_small_data
@@ -330,13 +385,13 @@ define dso_local i32 @load_forced_small_data() #0 {
;
; MEDIUM-STATIC-LABEL: load_forced_small_data:
; MEDIUM-STATIC: # %bb.0:
-; MEDIUM-STATIC-NEXT: movabsq $forced_small_data, %rax
+; MEDIUM-STATIC-NEXT: movl $forced_small_data, %eax
; MEDIUM-STATIC-NEXT: movl 8(%rax), %eax
; MEDIUM-STATIC-NEXT: retq
;
; LARGE-STATIC-LABEL: load_forced_small_data:
; LARGE-STATIC: # %bb.0:
-; LARGE-STATIC-NEXT: movabsq $forced_small_data, %rax
+; LARGE-STATIC-NEXT: movl $forced_small_data, %eax
; LARGE-STATIC-NEXT: movl 8(%rax), %eax
; LARGE-STATIC-NEXT: retq
;
@@ -359,21 +414,21 @@ define dso_local i32 @load_forced_small_data() #0 {
;
; LARGE-PIC-LABEL: load_forced_small_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L5$pb:
-; LARGE-PIC-NEXT: leaq .L5$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L5$pb, %rcx
+; LARGE-PIC-NEXT: .L6$pb:
+; LARGE-PIC-NEXT: leaq .L6$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L6$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
-; LARGE-PIC-NEXT: movabsq $forced_small_data at GOTOFF, %rax
+; LARGE-PIC-NEXT: movl $forced_small_data at GOTOFF, %eax
; LARGE-PIC-NEXT: movl 8(%rcx,%rax), %eax
; LARGE-PIC-NEXT: retq
;
; LARGE-SMALL-DATA-PIC-LABEL: load_forced_small_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L5$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L5$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L5$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L6$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L6$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L6$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $forced_small_data at GOTOFF, %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movl $forced_small_data at GOTOFF, %eax
; LARGE-SMALL-DATA-PIC-NEXT: movl 8(%rcx,%rax), %eax
; LARGE-SMALL-DATA-PIC-NEXT: retq
%rv = load i32, ptr getelementptr inbounds (i32, ptr @forced_small_data, i64 2)
@@ -384,7 +439,7 @@ define dso_local i32 @load_forced_small_data() #0 {
define dso_local ptr @lea_forced_large_data() #0 {
; SMALL-STATIC-LABEL: lea_forced_large_data:
; SMALL-STATIC: # %bb.0:
-; SMALL-STATIC-NEXT: movl $forced_large_data, %eax
+; SMALL-STATIC-NEXT: movabsq $forced_large_data, %rax
; SMALL-STATIC-NEXT: retq
;
; MEDIUM-STATIC-LABEL: lea_forced_large_data:
@@ -419,9 +474,9 @@ define dso_local ptr @lea_forced_large_data() #0 {
;
; LARGE-PIC-LABEL: lea_forced_large_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L6$pb:
-; LARGE-PIC-NEXT: leaq .L6$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L6$pb, %rcx
+; LARGE-PIC-NEXT: .L7$pb:
+; LARGE-PIC-NEXT: leaq .L7$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L7$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $forced_large_data at GOTOFF, %rax
; LARGE-PIC-NEXT: addq %rcx, %rax
@@ -429,9 +484,9 @@ define dso_local ptr @lea_forced_large_data() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_forced_large_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L6$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L6$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L6$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L7$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L7$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L7$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $forced_large_data at GOTOFF, %rax
; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
@@ -479,9 +534,9 @@ define dso_local i32 @load_forced_large_data() #0 {
;
; LARGE-PIC-LABEL: load_forced_large_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L7$pb:
-; LARGE-PIC-NEXT: leaq .L7$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L7$pb, %rcx
+; LARGE-PIC-NEXT: .L8$pb:
+; LARGE-PIC-NEXT: leaq .L8$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L8$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $forced_large_data at GOTOFF, %rax
; LARGE-PIC-NEXT: movl 8(%rcx,%rax), %eax
@@ -489,9 +544,9 @@ define dso_local i32 @load_forced_large_data() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: load_forced_large_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L7$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L7$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L7$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L8$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L8$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L8$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $forced_large_data at GOTOFF, %rax
; LARGE-SMALL-DATA-PIC-NEXT: movl 8(%rcx,%rax), %eax
@@ -538,9 +593,9 @@ define dso_local i32 @load_global_data() #0 {
;
; LARGE-PIC-LABEL: load_global_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L8$pb:
-; LARGE-PIC-NEXT: leaq .L8$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L8$pb, %rcx
+; LARGE-PIC-NEXT: .L9$pb:
+; LARGE-PIC-NEXT: leaq .L9$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L9$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $global_data at GOTOFF, %rax
; LARGE-PIC-NEXT: movl 8(%rcx,%rax), %eax
@@ -548,11 +603,11 @@ define dso_local i32 @load_global_data() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: load_global_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L8$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L8$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L8$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L9$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L9$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L9$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $global_data at GOTOFF, %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movl $global_data at GOTOFF, %eax
; LARGE-SMALL-DATA-PIC-NEXT: movl 8(%rcx,%rax), %eax
; LARGE-SMALL-DATA-PIC-NEXT: retq
%rv = load i32, ptr getelementptr inbounds ([10 x i32], ptr @global_data, i64 0, i64 2)
@@ -598,9 +653,9 @@ define dso_local i32 @load_extern_data() #0 {
;
; LARGE-PIC-LABEL: load_extern_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L9$pb:
-; LARGE-PIC-NEXT: leaq .L9$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L9$pb, %rcx
+; LARGE-PIC-NEXT: .L10$pb:
+; LARGE-PIC-NEXT: leaq .L10$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L10$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $extern_data at GOT, %rax
; LARGE-PIC-NEXT: movq (%rcx,%rax), %rax
@@ -609,11 +664,11 @@ define dso_local i32 @load_extern_data() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: load_extern_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L9$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L9$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L9$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L10$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L10$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L10$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $extern_data at GOT, %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movl $extern_data at GOT, %eax
; LARGE-SMALL-DATA-PIC-NEXT: movq (%rcx,%rax), %rax
; LARGE-SMALL-DATA-PIC-NEXT: movl 8(%rax), %eax
; LARGE-SMALL-DATA-PIC-NEXT: retq
@@ -660,9 +715,9 @@ define dso_local i32 @load_unknown_size_data() #0 {
;
; LARGE-PIC-LABEL: load_unknown_size_data:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L10$pb:
-; LARGE-PIC-NEXT: leaq .L10$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L10$pb, %rcx
+; LARGE-PIC-NEXT: .L11$pb:
+; LARGE-PIC-NEXT: leaq .L11$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L11$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $unknown_size_data at GOTOFF, %rax
; LARGE-PIC-NEXT: movl 8(%rcx,%rax), %eax
@@ -670,9 +725,9 @@ define dso_local i32 @load_unknown_size_data() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: load_unknown_size_data:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L10$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L10$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L10$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L11$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L11$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L11$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $unknown_size_data at GOTOFF, %rax
; LARGE-SMALL-DATA-PIC-NEXT: movl 8(%rcx,%rax), %eax
@@ -718,9 +773,9 @@ define dso_local ptr @lea_opaque() #0 {
;
; LARGE-PIC-LABEL: lea_opaque:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L11$pb:
-; LARGE-PIC-NEXT: leaq .L11$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L11$pb, %rcx
+; LARGE-PIC-NEXT: .L12$pb:
+; LARGE-PIC-NEXT: leaq .L12$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L12$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $opaque at GOTOFF, %rax
; LARGE-PIC-NEXT: addq %rcx, %rax
@@ -728,9 +783,9 @@ define dso_local ptr @lea_opaque() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_opaque:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L11$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L11$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L11$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L12$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L12$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L12$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $opaque at GOTOFF, %rax
; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
@@ -799,9 +854,9 @@ define dso_local ptr @lea_static_fn() #0 {
;
; LARGE-PIC-LABEL: lea_static_fn:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L15$pb:
-; LARGE-PIC-NEXT: leaq .L15$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L15$pb, %rcx
+; LARGE-PIC-NEXT: .L16$pb:
+; LARGE-PIC-NEXT: leaq .L16$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L16$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $static_fn at GOTOFF, %rax
; LARGE-PIC-NEXT: addq %rcx, %rax
@@ -809,9 +864,9 @@ define dso_local ptr @lea_static_fn() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_static_fn:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L15$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L15$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L15$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L16$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L16$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L16$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $static_fn at GOTOFF, %rax
; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
@@ -852,9 +907,9 @@ define dso_local ptr @lea_global_fn() #0 {
;
; LARGE-PIC-LABEL: lea_global_fn:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L16$pb:
-; LARGE-PIC-NEXT: leaq .L16$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L16$pb, %rcx
+; LARGE-PIC-NEXT: .L17$pb:
+; LARGE-PIC-NEXT: leaq .L17$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L17$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $global_fn at GOTOFF, %rax
; LARGE-PIC-NEXT: addq %rcx, %rax
@@ -862,9 +917,9 @@ define dso_local ptr @lea_global_fn() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_global_fn:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L16$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L16$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L16$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L17$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L17$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L17$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $global_fn at GOTOFF, %rax
; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
@@ -905,9 +960,9 @@ define dso_local ptr @lea_extern_fn() #0 {
;
; LARGE-PIC-LABEL: lea_extern_fn:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L17$pb:
-; LARGE-PIC-NEXT: leaq .L17$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L17$pb, %rcx
+; LARGE-PIC-NEXT: .L18$pb:
+; LARGE-PIC-NEXT: leaq .L18$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L18$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $extern_fn at GOT, %rax
; LARGE-PIC-NEXT: movq (%rcx,%rax), %rax
@@ -915,9 +970,9 @@ define dso_local ptr @lea_extern_fn() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_extern_fn:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L17$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L17$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L17$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L18$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L18$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L18$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $extern_fn at GOT, %rax
; LARGE-SMALL-DATA-PIC-NEXT: movq (%rcx,%rax), %rax
@@ -958,9 +1013,9 @@ define dso_local ptr @lea_ifunc() #0 {
;
; LARGE-PIC-LABEL: lea_ifunc:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L18$pb:
-; LARGE-PIC-NEXT: leaq .L18$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L18$pb, %rcx
+; LARGE-PIC-NEXT: .L19$pb:
+; LARGE-PIC-NEXT: leaq .L19$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L19$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $ifunc_func at GOT, %rax
; LARGE-PIC-NEXT: movq (%rcx,%rax), %rax
@@ -968,9 +1023,9 @@ define dso_local ptr @lea_ifunc() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_ifunc:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L18$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L18$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L18$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L19$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L19$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L19$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $ifunc_func at GOT, %rax
; LARGE-SMALL-DATA-PIC-NEXT: movq (%rcx,%rax), %rax
@@ -986,7 +1041,7 @@ define dso_local ptr @lea_dso_local_ifunc() #0 {
;
; MEDIUM-STATIC-LABEL: lea_dso_local_ifunc:
; MEDIUM-STATIC: # %bb.0:
-; MEDIUM-STATIC-NEXT: movabsq $dso_local_ifunc_func, %rax
+; MEDIUM-STATIC-NEXT: movl $dso_local_ifunc_func, %eax
; MEDIUM-STATIC-NEXT: retq
;
; LARGE-STATIC-LABEL: lea_dso_local_ifunc:
@@ -1011,9 +1066,9 @@ define dso_local ptr @lea_dso_local_ifunc() #0 {
;
; LARGE-PIC-LABEL: lea_dso_local_ifunc:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L19$pb:
-; LARGE-PIC-NEXT: leaq .L19$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L19$pb, %rcx
+; LARGE-PIC-NEXT: .L20$pb:
+; LARGE-PIC-NEXT: leaq .L20$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L20$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq $dso_local_ifunc_func at GOTOFF, %rax
; LARGE-PIC-NEXT: addq %rcx, %rax
@@ -1021,9 +1076,9 @@ define dso_local ptr @lea_dso_local_ifunc() #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: lea_dso_local_ifunc:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L19$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L19$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L19$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L20$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L20$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L20$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq $dso_local_ifunc_func at GOTOFF, %rax
; LARGE-SMALL-DATA-PIC-NEXT: addq %rcx, %rax
@@ -1072,7 +1127,7 @@ define dso_local float @load_constant_pool(float %x) #0 {
;
; MEDIUM-STATIC-LABEL: load_constant_pool:
; MEDIUM-STATIC: # %bb.0:
-; MEDIUM-STATIC-NEXT: movabsq ${{\.?LCPI[0-9]+_[0-9]+}}, %rax
+; MEDIUM-STATIC-NEXT: movl ${{\.?LCPI[0-9]+_[0-9]+}}, %eax
; MEDIUM-STATIC-NEXT: addss (%rax), %xmm0
; MEDIUM-STATIC-NEXT: retq
;
@@ -1099,9 +1154,9 @@ define dso_local float @load_constant_pool(float %x) #0 {
;
; LARGE-PIC-LABEL: load_constant_pool:
; LARGE-PIC: # %bb.0:
-; LARGE-PIC-NEXT: .L21$pb:
-; LARGE-PIC-NEXT: leaq .L21$pb(%rip), %rax
-; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L21$pb, %rcx
+; LARGE-PIC-NEXT: .L22$pb:
+; LARGE-PIC-NEXT: leaq .L22$pb(%rip), %rax
+; LARGE-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L22$pb, %rcx
; LARGE-PIC-NEXT: addq %rax, %rcx
; LARGE-PIC-NEXT: movabsq ${{\.?LCPI[0-9]+_[0-9]+}}@GOTOFF, %rax
; LARGE-PIC-NEXT: addss (%rcx,%rax), %xmm0
@@ -1109,9 +1164,9 @@ define dso_local float @load_constant_pool(float %x) #0 {
;
; LARGE-SMALL-DATA-PIC-LABEL: load_constant_pool:
; LARGE-SMALL-DATA-PIC: # %bb.0:
-; LARGE-SMALL-DATA-PIC-NEXT: .L21$pb:
-; LARGE-SMALL-DATA-PIC-NEXT: leaq .L21$pb(%rip), %rax
-; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L21$pb, %rcx
+; LARGE-SMALL-DATA-PIC-NEXT: .L22$pb:
+; LARGE-SMALL-DATA-PIC-NEXT: leaq .L22$pb(%rip), %rax
+; LARGE-SMALL-DATA-PIC-NEXT: movabsq $_GLOBAL_OFFSET_TABLE_-.L22$pb, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: addq %rax, %rcx
; LARGE-SMALL-DATA-PIC-NEXT: movabsq ${{\.?LCPI[0-9]+_[0-9]+}}@GOTOFF, %rax
; LARGE-SMALL-DATA-PIC-NEXT: addss (%rcx,%rax), %xmm0
More information about the llvm-commits
mailing list