@@ -3852,6 +3852,10 @@ bool LLParser::parseValID(ValID &ID, PerFunctionState *PFS, Type *ExpectedTy) {
38523852 return error (ID.Loc , " and constexprs are no longer supported" );
38533853 case lltok::kw_or:
38543854 return error (ID.Loc , " or constexprs are no longer supported" );
3855+ case lltok::kw_lshr:
3856+ return error (ID.Loc , " lshr constexprs are no longer supported" );
3857+ case lltok::kw_ashr:
3858+ return error (ID.Loc , " ashr constexprs are no longer supported" );
38553859 case lltok::kw_fneg:
38563860 return error (ID.Loc , " fneg constexprs are no longer supported" );
38573861 case lltok::kw_select:
@@ -3910,12 +3914,9 @@ bool LLParser::parseValID(ValID &ID, PerFunctionState *PFS, Type *ExpectedTy) {
39103914 case lltok::kw_sub:
39113915 case lltok::kw_mul:
39123916 case lltok::kw_shl:
3913- case lltok::kw_lshr:
3914- case lltok::kw_ashr:
39153917 case lltok::kw_xor: {
39163918 bool NUW = false ;
39173919 bool NSW = false ;
3918- bool Exact = false ;
39193920 unsigned Opc = Lex.getUIntVal ();
39203921 Constant *Val0, *Val1;
39213922 Lex.Lex ();
@@ -3928,10 +3929,6 @@ bool LLParser::parseValID(ValID &ID, PerFunctionState *PFS, Type *ExpectedTy) {
39283929 if (EatIfPresent (lltok::kw_nuw))
39293930 NUW = true ;
39303931 }
3931- } else if (Opc == Instruction::SDiv || Opc == Instruction::UDiv ||
3932- Opc == Instruction::LShr || Opc == Instruction::AShr) {
3933- if (EatIfPresent (lltok::kw_exact))
3934- Exact = true ;
39353932 }
39363933 if (parseToken (lltok::lparen, " expected '(' in binary constantexpr" ) ||
39373934 parseGlobalTypeAndValue (Val0) ||
@@ -3948,7 +3945,6 @@ bool LLParser::parseValID(ValID &ID, PerFunctionState *PFS, Type *ExpectedTy) {
39483945 unsigned Flags = 0 ;
39493946 if (NUW) Flags |= OverflowingBinaryOperator::NoUnsignedWrap;
39503947 if (NSW) Flags |= OverflowingBinaryOperator::NoSignedWrap;
3951- if (Exact) Flags |= PossiblyExactOperator::IsExact;
39523948 ID.ConstantVal = ConstantExpr::get (Opc, Val0, Val1, Flags);
39533949 ID.Kind = ValID::t_Constant;
39543950 return false ;
0 commit comments