Set up MCSchedModel after detecting the CPU type in X86SubTarget.
[oota-llvm.git] / lib / Target / TargetData.cpp
index cc6dc1e25998eb4379d0c9fb05b8e33f8a428c41..0040147022d3d9be77c7a2b649b184d93e58909b 100644 (file)
@@ -314,6 +314,8 @@ void
 TargetData::setAlignment(AlignTypeEnum align_type, unsigned abi_align,
                          unsigned pref_align, uint32_t bit_width) {
   assert(abi_align <= pref_align && "Preferred alignment worse than ABI!");
+  assert(pref_align < (1 << 16) && "Alignment doesn't fit in bitfield");
+  assert(bit_width < (1 << 24) && "Bit width doesn't fit in bitfield");
   for (unsigned i = 0, e = Alignments.size(); i != e; ++i) {
     if (Alignments[i].AlignType == align_type &&
         Alignments[i].TypeBitWidth == bit_width) {