mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 21:50:11 +01:00
nak/opt_copy_prop: Force alu src for IAdd2X/IAdd3X
Cc: mesa-stable Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com> Reviewed-by: Faith Ekstrand <None> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33420>
This commit is contained in:
parent
2fa557d29d
commit
48edb9cec2
1 changed files with 6 additions and 2 deletions
|
|
@ -643,9 +643,13 @@ impl CopyPropPass {
|
|||
// written.
|
||||
let force_alu_src_type = match &instr.op {
|
||||
Op::IAdd2(add) => !add.carry_out.is_none(),
|
||||
Op::IAdd2X(add) => !add.carry_out.is_none(),
|
||||
Op::IAdd3(add) => {
|
||||
!add.overflow[0].is_none() || !add.overflow[1].is_none()
|
||||
}
|
||||
Op::IAdd3X(add) => {
|
||||
!add.overflow[0].is_none() || !add.overflow[1].is_none()
|
||||
}
|
||||
_ => false,
|
||||
};
|
||||
|
||||
|
|
@ -654,8 +658,8 @@ impl CopyPropPass {
|
|||
let mut src_type = src_types[i];
|
||||
if force_alu_src_type {
|
||||
src_type = match src_type {
|
||||
SrcType::I32 => SrcType::ALU,
|
||||
SrcType::Pred => SrcType::Pred,
|
||||
SrcType::B32 | SrcType::I32 => SrcType::ALU,
|
||||
SrcType::Carry | SrcType::Pred => src_type,
|
||||
_ => panic!("Unhandled src_type"),
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue