Strip the _lohi suffix from the isplit instructions.
For symmetry with the vector splitting instructions, we now have:
isplit iconcat
vsplit vconcat
No functional change.
This commit is contained in:
@@ -1286,8 +1286,8 @@ lo = Operand(
|
||||
hi = Operand(
|
||||
'hi', WideInt.half_width(), 'The high bits of `x`')
|
||||
|
||||
isplit_lohi = Instruction(
|
||||
'isplit_lohi', r"""
|
||||
isplit = Instruction(
|
||||
'isplit', r"""
|
||||
Split a scalar integer into low and high parts.
|
||||
|
||||
Returns the low half of `x` and the high half of `x` as two independent
|
||||
@@ -1305,8 +1305,8 @@ a = Operand(
|
||||
'a', NarrowInt.double_width(),
|
||||
doc='The concatenation of `lo` and `hi`')
|
||||
|
||||
iconcat_lohi = Instruction(
|
||||
'iconcat_lohi', r"""
|
||||
iconcat = Instruction(
|
||||
'iconcat', r"""
|
||||
Concatenate low and high bits to form a larger integer type.
|
||||
""",
|
||||
ins=(lo, hi), outs=a)
|
||||
|
||||
@@ -9,7 +9,7 @@ instructions that are legal.
|
||||
from __future__ import absolute_import
|
||||
from .instructions import iadd, iadd_cout, iadd_cin, iadd_carry, iadd_imm
|
||||
from .instructions import isub, isub_bin, isub_bout, isub_borrow
|
||||
from .instructions import band, bor, bxor, isplit_lohi, iconcat_lohi
|
||||
from .instructions import band, bor, bxor, isplit, iconcat
|
||||
from .instructions import icmp, iconst
|
||||
from cdsl.ast import Var
|
||||
from cdsl.xform import Rtl, XFormGroup
|
||||
@@ -54,32 +54,32 @@ ah = Var('ah')
|
||||
narrow.legalize(
|
||||
a << iadd(x, y),
|
||||
Rtl(
|
||||
(xl, xh) << isplit_lohi(x),
|
||||
(yl, yh) << isplit_lohi(y),
|
||||
(xl, xh) << isplit(x),
|
||||
(yl, yh) << isplit(y),
|
||||
(al, c) << iadd_cout(xl, yl),
|
||||
ah << iadd_cin(xh, yh, c),
|
||||
a << iconcat_lohi(al, ah)
|
||||
a << iconcat(al, ah)
|
||||
))
|
||||
|
||||
narrow.legalize(
|
||||
a << isub(x, y),
|
||||
Rtl(
|
||||
(xl, xh) << isplit_lohi(x),
|
||||
(yl, yh) << isplit_lohi(y),
|
||||
(xl, xh) << isplit(x),
|
||||
(yl, yh) << isplit(y),
|
||||
(al, b) << isub_bout(xl, yl),
|
||||
ah << isub_bin(xh, yh, b),
|
||||
a << iconcat_lohi(al, ah)
|
||||
a << iconcat(al, ah)
|
||||
))
|
||||
|
||||
for bitop in [band, bor, bxor]:
|
||||
narrow.legalize(
|
||||
a << bitop(x, y),
|
||||
Rtl(
|
||||
(xl, xh) << isplit_lohi(x),
|
||||
(yl, yh) << isplit_lohi(y),
|
||||
(xl, xh) << isplit(x),
|
||||
(yl, yh) << isplit(y),
|
||||
al << bitop(xl, yl),
|
||||
ah << bitop(xh, yh),
|
||||
a << iconcat_lohi(al, ah)
|
||||
a << iconcat(al, ah)
|
||||
))
|
||||
|
||||
# Expand integer operations with carry for RISC architectures that don't have
|
||||
|
||||
@@ -38,10 +38,10 @@ impl From<ValueConversion> for ArgAction {
|
||||
/// Legalization action to be applied to a value that is being passed to or from a legalized ABI.
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||
pub enum ValueConversion {
|
||||
/// Split an integer types into low and high parts, using `isplit_lohi`.
|
||||
/// Split an integer types into low and high parts, using `isplit`.
|
||||
IntSplit,
|
||||
|
||||
/// Split a vector type into halves with identical lane types.
|
||||
/// Split a vector type into halves with identical lane types, using `vsplit`.
|
||||
VectorSplit,
|
||||
|
||||
/// Bit-cast to an integer type of the same size.
|
||||
|
||||
@@ -210,7 +210,7 @@ fn convert_from_abi<GetArg>(dfg: &mut DataFlowGraph,
|
||||
let abi_ty = ty.half_width().expect("Invalid type for conversion");
|
||||
let lo = convert_from_abi(dfg, pos, abi_ty, get_arg);
|
||||
let hi = convert_from_abi(dfg, pos, abi_ty, get_arg);
|
||||
dfg.ins(pos).iconcat_lohi(lo, hi)
|
||||
dfg.ins(pos).iconcat(lo, hi)
|
||||
}
|
||||
// Construct a `ty` by concatenating two halves of a vector.
|
||||
ValueConversion::VectorSplit => {
|
||||
@@ -271,7 +271,7 @@ fn convert_to_abi<PutArg>(dfg: &mut DataFlowGraph,
|
||||
let ty = dfg.value_type(value);
|
||||
match legalize_abi_value(ty, &arg_type) {
|
||||
ValueConversion::IntSplit => {
|
||||
let (lo, hi) = dfg.ins(pos).isplit_lohi(value);
|
||||
let (lo, hi) = dfg.ins(pos).isplit(value);
|
||||
convert_to_abi(dfg, pos, lo, put_arg);
|
||||
convert_to_abi(dfg, pos, hi, put_arg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user