nak/legalize: Take a RegFile in copy_alu_src_and_lower_ineg()
Fixes: af6093a712
("nak/legalize: Add a helper for lowering ineg")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33107>
(cherry picked from commit 328112c6bc7ffe129b6b83619f3c130858e21417)
This commit is contained in:

committed by
Eric Engestrom

parent
9fa9cd870f
commit
0702e54b55
@@ -1974,7 +1974,7 @@
|
||||
"description": "nak/legalize: Take a RegFile in copy_alu_src_and_lower_ineg()",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "af6093a71267f6be5392c74491ab68f83ff750d0",
|
||||
"notes": null
|
||||
|
@@ -273,10 +273,11 @@ pub trait LegalizeBuildHelpers: SSABuilder {
|
||||
fn copy_alu_src_and_lower_ineg(
|
||||
&mut self,
|
||||
src: &mut Src,
|
||||
reg_file: RegFile,
|
||||
src_type: SrcType,
|
||||
) {
|
||||
assert!(src_type == SrcType::I32);
|
||||
let val = self.alloc_ssa(RegFile::GPR, 1);
|
||||
let val = self.alloc_ssa(reg_file, 1);
|
||||
if self.sm() >= 70 {
|
||||
self.push_op(OpIAdd3 {
|
||||
srcs: [Src::new_zero(), *src, Src::new_zero()],
|
||||
|
@@ -1238,7 +1238,7 @@ impl SM50Op for OpIAdd2 {
|
||||
swap_srcs_if_not_reg(src0, src1, GPR);
|
||||
if src0.src_mod.is_ineg() && src1.src_mod.is_ineg() {
|
||||
assert!(self.carry_out.is_none());
|
||||
b.copy_alu_src_and_lower_ineg(src0, SrcType::I32);
|
||||
b.copy_alu_src_and_lower_ineg(src0, GPR, SrcType::I32);
|
||||
}
|
||||
b.copy_alu_src_if_not_reg(src0, GPR, SrcType::I32);
|
||||
if !self.carry_out.is_none() {
|
||||
|
@@ -1362,7 +1362,7 @@ impl SM70Op for OpIAdd3 {
|
||||
if !src0.src_mod.is_none() && !src1.src_mod.is_none() {
|
||||
assert!(self.overflow[0].is_none());
|
||||
assert!(self.overflow[1].is_none());
|
||||
b.copy_alu_src_and_lower_ineg(src0, SrcType::I32);
|
||||
b.copy_alu_src_and_lower_ineg(src0, gpr, SrcType::I32);
|
||||
}
|
||||
b.copy_alu_src_if_not_reg(src0, gpr, SrcType::I32);
|
||||
b.copy_alu_src_if_both_not_reg(src1, src2, gpr, SrcType::I32);
|
||||
|
Reference in New Issue
Block a user