nak/sm50: Fix legalization of OpIAdd

Most of them specified bits 20..40 which is wrong because it's actually
19 bits with the sign bit off in bit 56 for some reason.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26615>
This commit is contained in:
Faith Ekstrand 2023-12-09 10:38:55 -06:00 committed by Marge Bot
parent e697280ebf
commit 2199eea31b

View file

@ -147,7 +147,9 @@ fn legalize_sm50_instr(
}
Op::Vote(_) => (),
Op::IAdd2(op) => {
copy_src_if_not_reg(b, &mut op.srcs[1], RegFile::GPR);
let [ref mut src0, ref mut src1] = op.srcs;
swap_srcs_if_not_reg(src0, src1);
copy_src_if_not_reg(b, src0, RegFile::GPR);
}
Op::I2F(op) => {
copy_src_if_not_reg(b, &mut op.src, RegFile::GPR);