aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorGuillaume Chatelet <gchatelet@google.com>2021-06-07 10:04:16 +0000
committerGuillaume Chatelet <gchatelet@google.com>2021-06-07 10:04:16 +0000
commit1da2c7d25c0926b1ebac5855ab099b004b6a827a (patch)
tree0d5061f3b58f6318dd5b61171a299bd0fd3a587d /llvm/lib/CodeGen/TargetLoweringBase.cpp
parent131343d35bf2ce55001fdd9c4cdf2965b56f26d8 (diff)
downloadllvm-1da2c7d25c0926b1ebac5855ab099b004b6a827a.zip
llvm-1da2c7d25c0926b1ebac5855ab099b004b6a827a.tar.gz
llvm-1da2c7d25c0926b1ebac5855ab099b004b6a827a.tar.bz2
[NFC] Fix semantic discrepancy for MVT::LAST_VALUETYPE
Differential Revision: https://reviews.llvm.org/D103251
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index 7319753..f4e3fad 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp
@@ -1279,11 +1279,11 @@ TargetLoweringBase::findRepresentativeClass(const TargetRegisterInfo *TRI,
/// this allows us to compute derived properties we expose.
void TargetLoweringBase::computeRegisterProperties(
const TargetRegisterInfo *TRI) {
- static_assert(MVT::LAST_VALUETYPE <= MVT::MAX_ALLOWED_VALUETYPE,
+ static_assert(MVT::VALUETYPE_SIZE <= MVT::MAX_ALLOWED_VALUETYPE,
"Too many value types for ValueTypeActions to hold!");
// Everything defaults to needing one register.
- for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) {
+ for (unsigned i = 0; i != MVT::VALUETYPE_SIZE; ++i) {
NumRegistersForVT[i] = 1;
RegisterTypeForVT[i] = TransformToType[i] = (MVT::SimpleValueType)i;
}
@@ -1495,7 +1495,7 @@ void TargetLoweringBase::computeRegisterProperties(
// not a sub-register class / subreg register class) legal register class for
// a group of value types. For example, on i386, i8, i16, and i32
// representative would be GR32; while on x86_64 it's GR64.
- for (unsigned i = 0; i != MVT::LAST_VALUETYPE; ++i) {
+ for (unsigned i = 0; i != MVT::VALUETYPE_SIZE; ++i) {
const TargetRegisterClass* RRC;
uint8_t Cost;
std::tie(RRC, Cost) = findRepresentativeClass(TRI, (MVT::SimpleValueType)i);