Index: lib/Target/ARM/ARMISelLowering.cpp =================================================================== --- lib/Target/ARM/ARMISelLowering.cpp +++ lib/Target/ARM/ARMISelLowering.cpp @@ -3066,6 +3066,10 @@ if (!PaddingPossible || Align > 4 || Size > ConstpoolPromotionMaxSize) return SDValue(); + // The constant pool can only handle constants with a Size >= 4. + if (Size < 4) + return SDValue(); + unsigned PaddedSize = Size + ((RequiredPadding == 4) ? 0 : RequiredPadding); MachineFunction &MF = DAG.getMachineFunction(); ARMFunctionInfo *AFI = MF.getInfo();