diff options
author | Patrik Hägglund <patrik.h.hagglund@ericsson.com> | 2012-11-23 08:35:04 +0000 |
---|---|---|
committer | Patrik Hägglund <patrik.h.hagglund@ericsson.com> | 2012-11-23 08:35:04 +0000 |
commit | d5f03186e5b5c20225ba05d4506100ad763c79a1 (patch) | |
tree | 223f52a7119b188793f1706e18a56eafebe9722a | |
parent | e84b47e41c260be4e4c08ac9fc67bfd6cb356956 (diff) | |
download | llvm-d5f03186e5b5c20225ba05d4506100ad763c79a1.tar.gz llvm-d5f03186e5b5c20225ba05d4506100ad763c79a1.tar.bz2 llvm-d5f03186e5b5c20225ba05d4506100ad763c79a1.tar.xz |
Cleanup: Simplify loop end logic in computeRegisterProperties().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168507 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/TargetLowering.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 49f55e2fc6..794935dad5 100644 --- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -758,14 +758,13 @@ void TargetLowering::computeRegisterProperties() { // Every integer value type larger than this largest register takes twice as // many registers to represent as the previous ValueType. - for (unsigned ExpandedReg = LargestIntReg + 1; ; ++ExpandedReg) { - EVT ExpandedVT = (MVT::SimpleValueType)ExpandedReg; - if (!ExpandedVT.isInteger()) - break; + for (unsigned ExpandedReg = LargestIntReg + 1; + ExpandedReg <= MVT::LAST_INTEGER_VALUETYPE; ++ExpandedReg) { NumRegistersForVT[ExpandedReg] = 2*NumRegistersForVT[ExpandedReg-1]; RegisterTypeForVT[ExpandedReg] = (MVT::SimpleValueType)LargestIntReg; TransformToType[ExpandedReg] = (MVT::SimpleValueType)(ExpandedReg - 1); - ValueTypeActions.setTypeAction(ExpandedVT, TypeExpandInteger); + ValueTypeActions.setTypeAction((MVT::SimpleValueType)ExpandedReg, + TypeExpandInteger); } // Inspect all of the ValueType's smaller than the largest integer |