Index: lib/Target/X86/X86ISelLowering.cpp =================================================================== --- lib/Target/X86/X86ISelLowering.cpp +++ lib/Target/X86/X86ISelLowering.cpp @@ -8028,7 +8028,7 @@ // output register, mark it as legal and catch the pattern in instruction // selection to avoid emitting extra insturctions (for zeroing upper bits). if (SDValue Promoted = isTypePromotionOfi1ZeroUpBits(Op)) { - SDValue ZeroC = DAG.getConstant(0, dl, MVT::i64); + SDValue ZeroC = DAG.getIntPtrConstant(0, dl); SDValue AllZeros = DAG.getSplatBuildVector(ResVT, dl, ZeroC); return DAG.getNode(ISD::INSERT_SUBVECTOR, dl, ResVT, AllZeros, Promoted, ZeroC);