diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-11-09 04:47:27 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-11-09 04:47:27 +0000 |
| commit | 077166e3fa936fb15d7a0370b31cc3845138d9d9 (patch) | |
| tree | 47cdae2358e51916e25ad0bc7adb3cb282e13edc /llvm | |
| parent | a72bf0fae867dfcc090b39a5ab9840e2da31f9ee (diff) | |
| download | bcm5719-llvm-077166e3fa936fb15d7a0370b31cc3845138d9d9.tar.gz bcm5719-llvm-077166e3fa936fb15d7a0370b31cc3845138d9d9.zip | |
fix some bogus asserts, PR5049
llvm-svn: 86514
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Target/TargetLowering.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/include/llvm/Target/TargetLowering.h b/llvm/include/llvm/Target/TargetLowering.h index 1526a0de0c5..31a698b7e5f 100644 --- a/llvm/include/llvm/Target/TargetLowering.h +++ b/llvm/include/llvm/Target/TargetLowering.h @@ -978,7 +978,7 @@ protected: /// not work with the with specified type and indicate what to do about it. void setLoadExtAction(unsigned ExtType, MVT VT, LegalizeAction Action) { - assert((unsigned)VT.SimpleTy < sizeof(LoadExtActions[0])*4 && + assert((unsigned)VT.SimpleTy < MVT::LAST_VALUETYPE && ExtType < array_lengthof(LoadExtActions) && "Table isn't big enough!"); LoadExtActions[ExtType] &= ~(uint64_t(3UL) << VT.SimpleTy*2); @@ -990,7 +990,7 @@ protected: void setTruncStoreAction(MVT ValVT, MVT MemVT, LegalizeAction Action) { assert((unsigned)ValVT.SimpleTy < array_lengthof(TruncStoreActions) && - (unsigned)MemVT.SimpleTy < sizeof(TruncStoreActions[0])*4 && + (unsigned)MemVT.SimpleTy < MVT::LAST_VALUETYPE && "Table isn't big enough!"); TruncStoreActions[ValVT.SimpleTy] &= ~(uint64_t(3UL) << MemVT.SimpleTy*2); TruncStoreActions[ValVT.SimpleTy] |= (uint64_t)Action << MemVT.SimpleTy*2; @@ -1025,7 +1025,7 @@ protected: void setConvertAction(MVT FromVT, MVT ToVT, LegalizeAction Action) { assert((unsigned)FromVT.SimpleTy < array_lengthof(ConvertActions) && - (unsigned)ToVT.SimpleTy < sizeof(ConvertActions[0])*4 && + (unsigned)ToVT.SimpleTy < MVT::LAST_VALUETYPE && "Table isn't big enough!"); ConvertActions[FromVT.SimpleTy] &= ~(uint64_t(3UL) << ToVT.SimpleTy*2); ConvertActions[FromVT.SimpleTy] |= (uint64_t)Action << ToVT.SimpleTy*2; @@ -1035,7 +1035,7 @@ protected: /// supported on the target and indicate what to do about it. void setCondCodeAction(ISD::CondCode CC, MVT VT, LegalizeAction Action) { - assert((unsigned)VT.SimpleTy < sizeof(CondCodeActions[0])*4 && + assert((unsigned)VT.SimpleTy < MVT::LAST_VALUETYPE && (unsigned)CC < array_lengthof(CondCodeActions) && "Table isn't big enough!"); CondCodeActions[(unsigned)CC] &= ~(uint64_t(3UL) << VT.SimpleTy*2); |

