[llvm] [X86] Added support for 16bit LEA instruction (PR #122102)

Evgenii Kudriashov via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 07:38:51 PST 2025


================
@@ -3054,6 +3056,41 @@ bool X86DAGToDAGISel::selectMOV64Imm32(SDValue N, SDValue &Imm) {
   return !TM.isLargeGlobalValue(GV);
 }
 
+bool X86DAGToDAGISel::selectLEA64_16Addr(SDValue N, SDValue &Base,
----------------
e-kud wrote:

It looks like a copy-paste from `selectLEA64_32Addr`, isn't it? Maybe extract it into a separate function that accepts `MVT::{i16,i32}` and `X86::sub_{16,32}bit`?

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


More information about the llvm-commits mailing list