VIctory e29391f, 13185f5 and 4fc9d70, by hand

16-bit interpolations write the half op_sel picks, with omod and clamp; the
device says whether it was removed; detiling ends with its staging buffer.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
localandClaude Opus 5.5 committed 2026-11-25 01:12:28 -06:00
1 parent adb608af1f
commit 38410b88ab
4 files changed
+157 -2

No files matched your search

+17 -1
View File
@@ -9927,7 +9927,23 @@ impl<'a> Lower<'a> {
let f = half(self, h)?.ok_or("a packed input half no element holds")?;
self.as_int(f)
} else if f16 {
let f = half(self, h)?.ok_or("a packed input half no element holds")?;
let mut f = half(self, h)?.ok_or("a packed input half no element holds")?;
if let Fields::Valu(v) = &inst.fields {
// omod, then clamp, before the one rounding to 16 bits; op_sel[3]
// picks the destination half (VIctory e29391f: the low half was
// always written, the high one's value never arrived).
let (omod, clamp) = (v.omod, v.clamp);
if omod != 0 {
let factor = [1.0f32, 2.0, 4.0, 0.5][usize::from(omod)];
let k = self.s.m.f32(factor.to_bits());
f = self.s.m.bin(c, Bin::Mul, f, k);
}
if clamp {
f = self.unary(7, f);
}
let lo = to_f16(self, f);
return self.write_half(inst, lo, None);
}
let lo = to_f16(self, f);
self.low_half(inst, reg, lo)
} else if matches!(eval, Eval::Mode(1)) {