[llvm] [X86] Restrict offset folding into address mode in 16-bit mode (PR #179399)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 2 23:12:11 PST 2026


================
@@ -1852,6 +1852,11 @@ bool X86DAGToDAGISel::foldOffsetIntoAddress(uint64_t Offset,
         !isDispSafeForFrameIndexOrRegBase((uint32_t)Val) &&
         !AM.hasBaseOrIndexReg())
       return true;
+  } else if (Subtarget->is16Bit()) {
----------------
phoebewang wrote:

Nit: `(Subtarget->is16Bit() && !isInt<16>(Val))`?

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


More information about the llvm-commits mailing list