- 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
Event Timeline
| lib/Target/X86/X86InstrBuilder.h | ||
|---|---|---|
| 114–118 | 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 | ||
|---|---|---|
| 122 | MachineOperand::getImm() asserts isImm(), so it's redundant to assert isImm() before calling it. Same for getReg below. | |
Do not enclose single line substatements into braces