2 ms·
That is a complex rather than simple LEA instruction. There's a difference for Haswell and above. Being complex (3 operands), it takes 3 cycles rather than 1 c
by CalChris 8y ago
That is a complex rather than simple LEA instruction. There's a difference for Haswell and above.
Being complex (3 operands), it takes 3 cycles rather than 1 cycle for fast LEAs (1 or 2 operands).
It is also restricted to only the slow path port, port 1, instead of using ports 1 or 5 for fast path LEAs. ADD has 4 ports.
So Intel says in Section 3.5.1.2 of the Intel® 64 and IA-32 Architectures Optimization Reference Manual:
Assembly/Compiler Coding Rule 33. (ML impact, L generality) If an LEA instruction using the scaled index is on the critical path, a sequence with ADDs may be better. If code density and bandwidth out of the trace cache are the critical factor, then use the LEA instruction.