summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-08-28 20:11:27 +0000
committerMatthias Braun <matze@braunis.de>2017-08-28 20:11:27 +0000
commitabbc4a7f1aa056b316c40bbeafbf6b973f9c463d (patch)
tree3fbcec0fcf190e8a04116edec27842a4b95f6758 /llvm/utils
parent52a3e48e9f453a8b76547f38e8e1c184b510810c (diff)
downloadbcm5719-llvm-abbc4a7f1aa056b316c40bbeafbf6b973f9c463d.tar.gz
bcm5719-llvm-abbc4a7f1aa056b316c40bbeafbf6b973f9c463d.zip
Address r311914 review comments
llvm-svn: 311917
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/TableGen/CodeGenRegisters.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/utils/TableGen/CodeGenRegisters.cpp b/llvm/utils/TableGen/CodeGenRegisters.cpp
index 5ff1608afc9..425351ccf04 100644
--- a/llvm/utils/TableGen/CodeGenRegisters.cpp
+++ b/llvm/utils/TableGen/CodeGenRegisters.cpp
@@ -122,12 +122,11 @@ LaneBitmask CodeGenSubRegIndex::computeLaneMask() const {
void CodeGenSubRegIndex::setConcatenationOf(
ArrayRef<CodeGenSubRegIndex*> Parts) {
- if (ConcatenationOf.empty()) {
+ if (ConcatenationOf.empty())
ConcatenationOf.assign(Parts.begin(), Parts.end());
- } else {
+ else
assert(std::equal(Parts.begin(), Parts.end(),
ConcatenationOf.begin()) && "parts consistent");
- }
}
void CodeGenSubRegIndex::computeConcatTransitiveClosure() {
@@ -492,16 +491,15 @@ void CodeGenRegister::computeSecondarySubRegs(CodeGenRegBank &RegBank) {
SmallVector<CodeGenSubRegIndex*, 8> Parts;
// We know that the first component is (SubRegIdx,SubReg). However we
// may still need to split it into smaller subregister parts.
- assert(Cand->ExplicitSubRegs[0] == SubReg);
- assert(getSubRegIndex(SubReg) == SubRegIdx);
+ assert(Cand->ExplicitSubRegs[0] == SubReg && "LeadingSuperRegs correct");
+ assert(getSubRegIndex(SubReg) == SubRegIdx && "LeadingSuperRegs correct");
for (CodeGenRegister *SubReg : Cand->ExplicitSubRegs) {
if (CodeGenSubRegIndex *SubRegIdx = getSubRegIndex(SubReg)) {
if (SubRegIdx->ConcatenationOf.empty()) {
Parts.push_back(SubRegIdx);
- } else {
+ } else
for (CodeGenSubRegIndex *SubIdx : SubRegIdx->ConcatenationOf)
Parts.push_back(SubIdx);
- }
} else {
// Sub-register doesn't exist.
Parts.clear();
OpenPOWER on IntegriCloud