[llvm] [X86] Refine X86::isOffsetSuitableForCodeModel() (PR #75641)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 18 10:20:57 PST 2023


================
@@ -385,8 +385,8 @@ define dso_local i32 @load_forced_small_data() #0 {
 ;
 ; MEDIUM-STATIC-LABEL: load_forced_small_data:
 ; MEDIUM-STATIC:       # %bb.0:
-; MEDIUM-STATIC-NEXT:    movl $forced_small_data, %eax
-; MEDIUM-STATIC-NEXT:    movl 8(%rax), %eax
+; MEDIUM-STATIC-NEXT:    movl $forced_small_data+8, %eax
----------------
rnk wrote:

The TODO above still seems relevant, and I think to achieve that, we would need to do a RIP-relative access in the medium static model, which is out of scope for this change, that's in the code which controls WrapperRIP emission.

https://github.com/llvm/llvm-project/pull/75641


More information about the llvm-commits mailing list