Aggressive LEA Convert adds with a constant operand to lea on -aggressive-lea BUG=none R=stichnot@chromium.org Review URL: https://codereview.chromium.org/2135403002 .
diff --git a/src/IceInstX86BaseImpl.h b/src/IceInstX86BaseImpl.h index cfc36d4..4b9ea41 100644 --- a/src/IceInstX86BaseImpl.h +++ b/src/IceInstX86BaseImpl.h
@@ -2025,6 +2025,11 @@ void InstImpl<TraitsType>::InstX86Lea::emit(const Cfg *Func) const { if (!BuildDefs::dump()) return; + if (auto *Add = this->deoptLeaToAddOrNull(Func)) { + Add->emit(Func); + return; + } + Ostream &Str = Func->getContext()->getStrEmit(); assert(this->getSrcSize() == 1); assert(this->getDest()->hasReg());