pub fn optimize_instruction(instr: &mut Instruction, arch: Arch) -> boolExpand description
Apply peephole optimizations to an instruction (mutates in place).
Returns true if the instruction was modified.
§Side effects
The zero-idiom transform (mov reg, 0 → xor reg, reg) clobbers
FLAGS (sets ZF=1, clears CF/PF/SF/OF). This matches the behaviour of
GAS and NASM at -O2 and is safe whenever FLAGS are dead after the
instruction, which is the common case in practice.