In the frame index lowering we have to insert shift and add
instructions to adjust stack object access. We need to take care of the stack
object user kind and use scalar shift/add for scalar users.
Reviewed By: rampitec
Differential Revision: https://reviews.llvm.org/D121524
} else {
MachineInstrBuilder MIB;
if (!IsSALU) {
- if (MIB = TII->getAddNoCarry(*MBB, MI, DL, ResultReg, *RS)) {
+ if ((MIB = TII->getAddNoCarry(*MBB, MI, DL, ResultReg, *RS)) !=
+ nullptr) {
// Reuse ResultReg in intermediate step.
Register ScaledReg = ResultReg;