fix rounding mode of lrint
MODIFY
ir/attrs.cpp
ir/attrs.cpp
@@ -502,12 +502,12 @@ ostream& operator<<(ostream &os, const FastMathFlags &fm) {
smt::expr FpRoundingMode::toSMT() const {
switch (mode) {
case FpRoundingMode::Dynamic: UNREACHABLE();
+ case FpRoundingMode::Default:
case FpRoundingMode::RNE: return expr::rne();
case FpRoundingMode::RNA: return expr::rna();
case FpRoundingMode::RTP: return expr::rtp();
case FpRoundingMode::RTN: return expr::rtn();
case FpRoundingMode::RTZ: return expr::rtz();
- case FpRoundingMode::Default: UNREACHABLE();
}
UNREACHABLE();
}

MODIFY
ir/instr.cpp
ir/instr.cpp
@@ -1749,7 +1749,7 @@ StateValue FpConversionOp::toSMT(State &s) const {
np.add(sv.non_poison);
StateValue ret = to_type.isFloatType() ? round_value(s, rm, np, fn_rm)
- : fn(val, to_type, {});
+ : fn(val, to_type, rm);
return { to_type.isFloatType()
? to_type.getAsFloatType()->fromFloat(s, ret.value)

fix rounding mode of lrint