cranelift: Rename i{min,max} to s{min,max} (#5187)
This brings these instructions with our general naming convention of signed instructions being prefixed with `s`.
This commit is contained in:
@@ -1493,7 +1493,7 @@ impl AtomicOP {
|
||||
}
|
||||
|
||||
/// like extract but sign extend the value.
|
||||
/// suitable for imax.
|
||||
/// suitable for smax.
|
||||
pub(crate) fn extract_sext(
|
||||
rd: WritableReg,
|
||||
offset: Reg,
|
||||
@@ -1594,9 +1594,9 @@ impl IntSelectOP {
|
||||
#[inline]
|
||||
pub(crate) fn from_ir_op(op: crate::ir::Opcode) -> Self {
|
||||
match op {
|
||||
crate::ir::Opcode::Imax => Self::Imax,
|
||||
crate::ir::Opcode::Smax => Self::Smax,
|
||||
crate::ir::Opcode::Umax => Self::Umax,
|
||||
crate::ir::Opcode::Imin => Self::Imin,
|
||||
crate::ir::Opcode::Smin => Self::Smin,
|
||||
crate::ir::Opcode::Umin => Self::Umin,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
@@ -1604,18 +1604,18 @@ impl IntSelectOP {
|
||||
#[inline]
|
||||
pub(crate) fn op_name(self) -> &'static str {
|
||||
match self {
|
||||
IntSelectOP::Imax => "imax",
|
||||
IntSelectOP::Smax => "smax",
|
||||
IntSelectOP::Umax => "umax",
|
||||
IntSelectOP::Imin => "imin",
|
||||
IntSelectOP::Smin => "smin",
|
||||
IntSelectOP::Umin => "umin",
|
||||
}
|
||||
}
|
||||
#[inline]
|
||||
pub(crate) fn to_int_cc(self) -> IntCC {
|
||||
match self {
|
||||
IntSelectOP::Imax => IntCC::SignedGreaterThan,
|
||||
IntSelectOP::Smax => IntCC::SignedGreaterThan,
|
||||
IntSelectOP::Umax => IntCC::UnsignedGreaterThan,
|
||||
IntSelectOP::Imin => IntCC::SignedLessThan,
|
||||
IntSelectOP::Smin => IntCC::SignedLessThan,
|
||||
IntSelectOP::Umin => IntCC::UnsignedLessThan,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2188,7 +2188,7 @@ fn riscv64_worst_case_instruction_size() {
|
||||
candidates.push(Inst::IntSelect {
|
||||
dst: vec![writable_a0(), writable_a0()],
|
||||
ty: I128,
|
||||
op: IntSelectOP::Imax,
|
||||
op: IntSelectOP::Smax,
|
||||
x: ValueRegs::two(x_reg(1), x_reg(2)),
|
||||
y: ValueRegs::two(x_reg(3), x_reg(4)),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user