cranelift: Remove copy instruction (#5125)
This commit is contained in:
@@ -1467,10 +1467,5 @@ mod tests {
|
||||
|
||||
assert_eq!(pos.func.dfg.resolve_aliases(c2), c2);
|
||||
assert_eq!(pos.func.dfg.resolve_aliases(c), c2);
|
||||
|
||||
// Make a copy of the alias.
|
||||
let c3 = pos.ins().copy(c);
|
||||
// This does not see through copies.
|
||||
assert_eq!(pos.func.dfg.resolve_aliases(c3), c3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2265,11 +2265,6 @@
|
||||
(u8_from_uimm8 lane)))
|
||||
(mov_vec_elem vec val lane 0 (vector_size vty)))
|
||||
|
||||
;;; Rules for `copy` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule (lower (copy x))
|
||||
x)
|
||||
|
||||
;;; Rules for `stack_addr` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule (lower (stack_addr stack_slot offset))
|
||||
|
||||
@@ -157,8 +157,6 @@ pub(crate) fn lower_insn_to_regs(
|
||||
|
||||
Opcode::IsNull | Opcode::IsInvalid => implemented_in_isle(ctx),
|
||||
|
||||
Opcode::Copy => implemented_in_isle(ctx),
|
||||
|
||||
Opcode::Ireduce => implemented_in_isle(ctx),
|
||||
|
||||
Opcode::Bmask => implemented_in_isle(ctx),
|
||||
|
||||
@@ -535,10 +535,6 @@
|
||||
(_ Unit (emit (MInst.AtomicCas (gen_atomic_offset p ty) t0 dst (ext_int_if_need $false e ty) (gen_atomic_p p ty) x ty))))
|
||||
(writable_reg_to_reg dst)))
|
||||
|
||||
;;;;; Rules for `copy`;;;;;;;;;;;;;;;;;
|
||||
(rule (lower (has_type ty (copy x)))
|
||||
(gen_move2 x ty ty))
|
||||
|
||||
;;;;; Rules for `ireduce`;;;;;;;;;;;;;;;;;
|
||||
(rule
|
||||
(lower (has_type ty (ireduce x)))
|
||||
|
||||
@@ -46,12 +46,6 @@
|
||||
(invalid_reg))
|
||||
|
||||
|
||||
;;;; Rules for `copy` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule (lower (copy x))
|
||||
x)
|
||||
|
||||
|
||||
;;;; Rules for `iconcat` ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(rule (lower (has_type (vr128_ty ty) (iconcat x y)))
|
||||
|
||||
@@ -43,7 +43,6 @@ impl LowerBackend for S390xBackend {
|
||||
|
||||
match op {
|
||||
Opcode::Nop
|
||||
| Opcode::Copy
|
||||
| Opcode::Iconst
|
||||
| Opcode::F32const
|
||||
| Opcode::F64const
|
||||
|
||||
@@ -559,10 +559,6 @@ fn lower_insn_to_regs(
|
||||
panic!("table_addr should have been removed by legalization!");
|
||||
}
|
||||
|
||||
Opcode::Copy => {
|
||||
panic!("Unused opcode should not be encountered.");
|
||||
}
|
||||
|
||||
Opcode::Trapz | Opcode::Trapnz | Opcode::ResumableTrapnz => {
|
||||
panic!("trapz / trapnz / resumable_trapnz should have been removed by legalization!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user