[ARM64] use_iterator in ARM64AddressTypePromotion.cpp

Hi,

In ARM64AddressTypePromotion::propagateSignExtension(Instructions &SExtInsts) {

while (!Inst->use_empty()) {

Value::use_iterator UseIt = Inst->use_begin(); è should we use “user_iterator”, “user_begin()” here ?

Instruction *UseInst = dyn_cast(*UseIt);

assert(UseInst && “Use of sext is not an Instruction!”);

UseInst->setOperand(UseIt->getOperandNo(), SExt);

}

}

I don’t have a test case. I just saw it when I was browsing the code.

Thanks,

Weiming

Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation