diff --git a/src/mapleall/maple_me/src/me_value_range_prop.cpp b/src/mapleall/maple_me/src/me_value_range_prop.cpp index a236b10aadf1199fd5e215439866ffeb4e30f14c..851652fc3da61f92cb9a2b526ccb64f033e3f636 100644 --- a/src/mapleall/maple_me/src/me_value_range_prop.cpp +++ b/src/mapleall/maple_me/src/me_value_range_prop.cpp @@ -2881,7 +2881,11 @@ void ValueRangePropagation::DealWithOPNeOrEq( PrimType primType = opnd0->GetPrimType(); if (opMeExpr->GetNumOpnds() != 0) { opnd0 = opMeExpr->GetOpnd(0); - primType = opMeExpr->GetOpndType(); + if (kOpcodeInfo.IsTypeCvt(opMeExpr->GetOp()) || kOpcodeInfo.IsCompare(opMeExpr->GetOp())) { + primType = opMeExpr->GetOpndType(); + } else { + primType = opnd0->GetPrimType(); + } } if (leftRange == nullptr) { if (op == OP_eq) { @@ -3349,4 +3353,4 @@ bool MEValueRangePropagation::PhaseRun(maple::MeFunction &f) { } return true; } -} // namespace maple \ No newline at end of file +} // namespace maple