[IR] Reduce max supported integer from 2^24-1 to 2^23.
SelectionDAG will promote illegal types up to a power of 2 before splitting down to a legal type. This will create an IntegerType with a bit width that must be <= MAX_INT_BITS. This places an effective upper limit on any type of 2^23 so that we don't try create a 2^24 type. I considered putting a fatal error somewhere in the path from TargetLowering::getTypeConversion down to IntegerType::get, but limiting the type in IR seemed better. This breaks backwards compatibility with IR that is using a really large type. I suspect such IR is going to be very rare due to the the compile time costs such a type likely incurs. Prevents the ICE in PR51829. Reviewed By: efriedma, aaron.ballman Differential Revision: https://reviews.llvm.org/D109721
Loading
Please register or sign in to comment