[llvm] r267424 - [lanai] Expand findClosestSuitableAluInstr check to consider offset register.
Jacques Pienaar via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 25 09:41:23 PDT 2016
Author: jpienaar
Date: Mon Apr 25 11:41:21 2016
New Revision: 267424
URL: http://llvm.org/viewvc/llvm-project?rev=267424&view=rev
Log:
[lanai] Expand findClosestSuitableAluInstr check to consider offset register.
Previously findClosestSuitableAluInstr was only considering the base register when checking the current instruction for suitability. Expand check to consider the offset if the offset is a register.
Modified:
llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp
Modified: llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp?rev=267424&r1=267423&r2=267424&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp (original)
+++ llvm/trunk/lib/Target/Lanai/LanaiMemAluCombiner.cpp Mon Apr 25 11:41:21 2016
@@ -347,9 +347,12 @@ MbbIterator LanaiMemAluCombiner::findClo
return First;
}
- // Usage of the base register of a form not suitable for merging
- if (First != Last && InstrUsesReg(First, Base)) {
- break;
+ // Usage of the base or offset register is not a form suitable for merging.
+ if (First != Last) {
+ if (InstrUsesReg(First, Base))
+ break;
+ if (Offset->isReg() && InstrUsesReg(First, Offset))
+ break;
}
}
More information about the llvm-commits
mailing list