Skip to content

Commit cb22fa4

Browse files
committed
Mark x64 SSE constants as rematerializable
1 parent dd0b7a8 commit cb22fa4

File tree

1 file changed

+4
-2
lines changed
  • crates/codegen/src/target

1 file changed

+4
-2
lines changed

crates/codegen/src/target/x64.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,11 +477,13 @@ impl MachineRegalloc for X64Machine {
477477
X64Instr::MovRmS32(..)
478478
| X64Instr::MovRU32(..)
479479
| X64Instr::FuncAddrRel(..)
480-
| X64Instr::StackAddr(..) => Some(RematCost::CheapAsCopy),
480+
| X64Instr::StackAddr(..)
481+
| X64Instr::SseMovRZ => Some(RematCost::CheapAsCopy),
481482
X64Instr::MovRI64(..)
482483
| X64Instr::FuncAddrAbs(..)
483484
| X64Instr::MovRRbp { .. }
484-
| X64Instr::MovsdRRbp { .. } => Some(RematCost::CheapAsLoad),
485+
| X64Instr::MovsdRRbp { .. }
486+
| X64Instr::MovsdConstRel(..) => Some(RematCost::CheapAsLoad),
485487
_ => None,
486488
}
487489
}

0 commit comments

Comments
 (0)