[llvm] [X86] Fold cross-block constants into address mode displacement (PR #203883)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 20 08:04:14 PDT 2026
================
@@ -18,3 +18,60 @@ define fastcc void @foo() nounwind {
store i8 1, ptr %t, align 1
ret void
}
+
+; A compile-time constant used as a base address in a loop was not being
+; folded into the x86 displacement field, causing a redundant MOV
+;LLVM Issue- 198228
+
+ at g_align = dso_local global i64 16, align 8
+ at g_idx = dso_local global i64 5, align 8
+ at g_out = dso_local global i64 0, align 8
----------------
RKSimon wrote:
drop superfluous dso_local
https://github.com/llvm/llvm-project/pull/203883
More information about the llvm-commits
mailing list