[llvm-commits] [llvm] r91360 - /llvm/trunk/include/llvm/Target/TargetLowering.h
Dan Gohman
gohman at apple.com
Mon Dec 14 15:34:37 PST 2009
Author: djg
Date: Mon Dec 14 17:34:36 2009
New Revision: 91360
URL: http://llvm.org/viewvc/llvm-project?rev=91360&view=rev
Log:
Fix these asserts to check the invariant that the code actually
depends on.
Modified:
llvm/trunk/include/llvm/Target/TargetLowering.h
Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=91360&r1=91359&r2=91360&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon Dec 14 17:34:36 2009
@@ -972,7 +972,7 @@
/// 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 < MVT::LAST_VALUETYPE &&
+ assert((unsigned)VT.SimpleTy*2 < 63 &&
ExtType < array_lengthof(LoadExtActions) &&
"Table isn't big enough!");
LoadExtActions[ExtType] &= ~(uint64_t(3UL) << VT.SimpleTy*2);
@@ -984,7 +984,7 @@
void setTruncStoreAction(MVT ValVT, MVT MemVT,
LegalizeAction Action) {
assert((unsigned)ValVT.SimpleTy < array_lengthof(TruncStoreActions) &&
- (unsigned)MemVT.SimpleTy < MVT::LAST_VALUETYPE &&
+ (unsigned)MemVT.SimpleTy*2 < 63 &&
"Table isn't big enough!");
TruncStoreActions[ValVT.SimpleTy] &= ~(uint64_t(3UL) << MemVT.SimpleTy*2);
TruncStoreActions[ValVT.SimpleTy] |= (uint64_t)Action << MemVT.SimpleTy*2;
More information about the llvm-commits
mailing list