mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 18:08:40 +02: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>
(cherry picked from commit 48edb9cec2)
This commit is contained in:
parent
ea52e480cb
commit
92e02eebea
2 changed files with 7 additions and 3 deletions
|
|
@ -174,7 +174,7 @@
|
|||
"description": "nak/opt_copy_prop: Force alu src for IAdd2X/IAdd3X",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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