"immediates=[0], "
"outputs=(), name='st')",
])
+ self.assertEqual([repr(op.properties) for op in fn.ops], [
+ "OpProperties(kind=OpKind.FuncArgR3, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([3])}), ty=<I64>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.SetVLI, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.SvLd, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)])}), "
+ "ty=<I64>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.SvLI, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.SetCA, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.CA: FBitSet([0])}), ty=<CA>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.SvAddE, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.CA: FBitSet([0])}), ty=<CA>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.CA: FBitSet([0])}), ty=<CA>), "
+ "tied_input_index=None, spread_index=None)), maxvl=32)",
+ "OpProperties(kind=OpKind.SvStd, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)])}), "
+ "ty=<I64>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=(), maxvl=32)",
+ ])
def test_pre_ra_insert_copies(self):
fn, _arg = self.make_add_fn()
"immediates=[0], "
"outputs=(), name='st')",
])
+ self.assertEqual([repr(op.properties) for op in fn.ops], [
+ "OpProperties(kind=OpKind.FuncArgR3, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([3])}), ty=<I64>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.CopyFromReg, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)])}), "
+ "ty=<I64>), "
+ "tied_input_index=None, spread_index=None),), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)]), "
+ "LocKind.StackI64: FBitSet(range(0, 1024))}), ty=<I64>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.SetVLI, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.CopyToReg, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)]), "
+ "LocKind.StackI64: FBitSet(range(0, 1024))}), ty=<I64>), "
+ "tied_input_index=None, spread_index=None),), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)])}), "
+ "ty=<I64>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.SvLd, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)])}), "
+ "ty=<I64>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.SetVLI, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.VecCopyFromReg, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97)), "
+ "LocKind.StackI64: FBitSet(range(0, 993))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.SvLI, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.SetVLI, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.VecCopyFromReg, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97)), "
+ "LocKind.StackI64: FBitSet(range(0, 993))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.SetCA, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.CA: FBitSet([0])}), ty=<CA>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.SetVLI, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.VecCopyToReg, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97)), "
+ "LocKind.StackI64: FBitSet(range(0, 993))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.SetVLI, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.VecCopyToReg, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97)), "
+ "LocKind.StackI64: FBitSet(range(0, 993))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.SvAddE, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.CA: FBitSet([0])}), ty=<CA>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.CA: FBitSet([0])}), ty=<CA>), "
+ "tied_input_index=None, spread_index=None)), maxvl=32)",
+ "OpProperties(kind=OpKind.SetVLI, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.VecCopyFromReg, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97)), "
+ "LocKind.StackI64: FBitSet(range(0, 993))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.SetVLI, "
+ "inputs=(), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.VecCopyToReg, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97)), "
+ "LocKind.StackI64: FBitSet(range(0, 993))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None),), maxvl=32)",
+ "OpProperties(kind=OpKind.CopyToReg, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)]), "
+ "LocKind.StackI64: FBitSet(range(0, 1024))}), ty=<I64>), "
+ "tied_input_index=None, spread_index=None),), "
+ "outputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)])}), "
+ "ty=<I64>), "
+ "tied_input_index=None, spread_index=None),), maxvl=1)",
+ "OpProperties(kind=OpKind.SvStd, "
+ "inputs=("
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet(range(14, 97))}), ty=<I64*32>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.GPR: FBitSet([*range(3, 13), *range(14, 128)])}), "
+ "ty=<I64>), "
+ "tied_input_index=None, spread_index=None), "
+ "OperandDesc(loc_set_before_spread=LocSet(starts=FMap({"
+ "LocKind.VL_MAXVL: FBitSet([0])}), ty=<VL_MAXVL>), "
+ "tied_input_index=None, spread_index=None)), "
+ "outputs=(), maxvl=32)",
+ ])
def test_sim(self):
fn, arg = self.make_add_fn()