Rustfmt
This commit is contained in:
@@ -185,7 +185,9 @@ fn rewrite_expr(
|
||||
dummy_args.len(),
|
||||
"number of arguments in instruction {} is incorrect\nexpected: {:?}",
|
||||
apply_target.inst().name,
|
||||
apply_target.inst().operands_in
|
||||
apply_target
|
||||
.inst()
|
||||
.operands_in
|
||||
.iter()
|
||||
.map(|operand| format!("{}: {}", operand.name, operand.kind.name))
|
||||
.collect::<Vec<_>>(),
|
||||
|
||||
@@ -112,7 +112,9 @@ fn unwrap_inst(
|
||||
assert_eq!(inst.operands_in.len(), apply.args.len());
|
||||
for (i, op) in inst.operands_in.iter().enumerate() {
|
||||
if op.is_varargs() {
|
||||
let name = var_pool.get(apply.args[i].maybe_var().expect("vararg without name")).name;
|
||||
let name = var_pool
|
||||
.get(apply.args[i].maybe_var().expect("vararg without name"))
|
||||
.name;
|
||||
fmtln!(fmt, "let {} = &{};", name, name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ use crate::cdsl::xform::{TransformGroupBuilder, TransformGroups};
|
||||
|
||||
use crate::shared::immediates::Immediates;
|
||||
use crate::shared::types::Float::{F32, F64};
|
||||
use crate::shared::types::Int::{I16, I128, I32, I64, I8};
|
||||
use crate::shared::types::Int::{I128, I16, I32, I64, I8};
|
||||
|
||||
pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGroups {
|
||||
let mut narrow = TransformGroupBuilder::new(
|
||||
@@ -245,8 +245,20 @@ pub(crate) fn define(insts: &InstructionGroup, imm: &Immediates) -> TransformGro
|
||||
def!(brz.I128(x, ebb, vararg)),
|
||||
vec![
|
||||
def!((xl, xh) = isplit(x)),
|
||||
def!(a = icmp_imm(Literal::enumerator_for(intcc, "eq"), xl, Literal::constant(imm64, 0))),
|
||||
def!(b = icmp_imm(Literal::enumerator_for(intcc, "eq"), xh, Literal::constant(imm64, 0))),
|
||||
def!(
|
||||
a = icmp_imm(
|
||||
Literal::enumerator_for(intcc, "eq"),
|
||||
xl,
|
||||
Literal::constant(imm64, 0)
|
||||
)
|
||||
),
|
||||
def!(
|
||||
b = icmp_imm(
|
||||
Literal::enumerator_for(intcc, "eq"),
|
||||
xh,
|
||||
Literal::constant(imm64, 0)
|
||||
)
|
||||
),
|
||||
def!(c = band(a, b)),
|
||||
def!(brz(c, ebb, vararg)),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user