- It does not modify the input instruction
- Second operand of any address is always an Index Register, make sure we actually check for that, instead of a check for an immediate value
- Add two asserts along the way
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/X86/X86InstrBuilder.h | ||
---|---|---|
114–118 ↗ | (On Diff #72557) | Do not enclose single line substatements into braces |
Comment Actions
Looks good to me. It's surprising that a function called getAddressFromInstr would mutate a MachineOperand for the input.
lib/Target/X86/X86InstrBuilder.h | ||
---|---|---|
107 ↗ | (On Diff #72617) | MachineOperand::getImm() asserts isImm(), so it's redundant to assert isImm() before calling it. Same for getReg below. |