Chromium Code Reviews| Index: src/IceTargetLoweringARM32.cpp |
| diff --git a/src/IceTargetLoweringARM32.cpp b/src/IceTargetLoweringARM32.cpp |
| index 423572c51319aae678cd43d0797318e78b67f904..167e37c2dc1e0af621fd215b6902a40f5a759f8f 100644 |
| --- a/src/IceTargetLoweringARM32.cpp |
| +++ b/src/IceTargetLoweringARM32.cpp |
| @@ -56,7 +56,6 @@ const struct TableIcmp32_ { |
| ICMPARM32_TABLE |
| #undef X |
| }; |
| -const size_t TableIcmp32Size = llvm::array_lengthof(TableIcmp32); |
|
Jim Stichnoth
2015/09/09 18:52:00
I assume the problem was an unused variable in NOD
ascull
2015/09/09 18:55:06
I gave it a go but it still complained it was unus
|
| // The following table summarizes the logic for lowering the icmp instruction |
| // for the i64 type. Two conditional moves are needed for setting to 1 or 0. |
| @@ -73,11 +72,10 @@ const struct TableIcmp64_ { |
| ICMPARM32_TABLE |
| #undef X |
| }; |
| -const size_t TableIcmp64Size = llvm::array_lengthof(TableIcmp64); |
| CondARM32::Cond getIcmp32Mapping(InstIcmp::ICond Cond) { |
| size_t Index = static_cast<size_t>(Cond); |
| - assert(Index < TableIcmp32Size); |
| + assert(Index < llvm::array_lengthof(TableIcmp32)); |
| return TableIcmp32[Index].Mapping; |
| } |
| @@ -2165,7 +2163,7 @@ void TargetARM32::lowerIcmp(const InstIcmp *Inst) { |
| if (Src0->getType() == IceType_i64) { |
| InstIcmp::ICond Conditon = Inst->getCondition(); |
| size_t Index = static_cast<size_t>(Conditon); |
| - assert(Index < TableIcmp64Size); |
| + assert(Index < llvm::array_lengthof(TableIcmp64)); |
| Variable *Src0Lo, *Src0Hi; |
| Operand *Src1LoRF, *Src1HiRF; |
| if (TableIcmp64[Index].Swapped) { |