nak: Handle CS2R latencies in SSA form

Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38939>
This commit is contained in:
Mel Henning 2025-04-25 13:34:45 -04:00 committed by Marge Bot
parent fee87679bf
commit f5f89407f6
3 changed files with 10 additions and 2 deletions

View file

@ -497,6 +497,14 @@ impl Dst {
}
.iter_mut()
}
pub fn comps(&self) -> u8 {
match self {
Dst::None => 0,
Dst::SSA(ssa) => ssa.comps(),
Dst::Reg(reg) => reg.comps(),
}
}
}
impl From<RegRef> for Dst {

View file

@ -141,7 +141,7 @@ impl RegLatencySM75 {
}
}
Op::CS2R(cs2r) => {
if cs2r.dst.as_reg().unwrap().comps() == 2 {
if cs2r.dst.comps() == 2 {
CoupledDisp64
} else {
CoupledAlu

View file

@ -186,7 +186,7 @@ impl RegLatencySM80 {
}
}
Op::CS2R(cs2r) => {
if cs2r.dst.as_reg().unwrap().comps() == 2 {
if cs2r.dst.comps() == 2 {
CoupledDisp64
} else {
CoupledAlu