The MC ConstantPool class uses a DenseMap to track generated constants, with the int64_t value of the constant as the key. This fails when values of 0x7fffffffffffffff or0x7ffffffffffffffe are inserted into the constant pool, as these are sentinel values for DenseMap.
The fix is to use std::map instead, which doesn't use sentinel values.