diff --git a/src/nouveau/compiler/nak/ir.rs b/src/nouveau/compiler/nak/ir.rs index 6bc43aa1168..748c218ce3b 100644 --- a/src/nouveau/compiler/nak/ir.rs +++ b/src/nouveau/compiler/nak/ir.rs @@ -1310,13 +1310,12 @@ impl Src { } pub fn is_fneg_zero(&self, src_type: SrcType) -> bool { - match self.fold_imm(src_type).src_ref { - SrcRef::Zero => self.src_mod == SrcMod::FNeg, - SrcRef::Imm32(0x00008000) => src_type == SrcType::F16, - SrcRef::Imm32(0x80000000) => { + match self.as_u32(src_type) { + Some(0x00008000) => src_type == SrcType::F16, + Some(0x80000000) => { src_type == SrcType::F32 || src_type == SrcType::F64 } - SrcRef::Imm32(0x80008000) => src_type == SrcType::F16v2, + Some(0x80008000) => src_type == SrcType::F16v2, _ => false, } }