From 10701ac33122bd1b8fe2a137b55f62890cb2c615 Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Fri, 26 Jul 2024 20:55:01 -0500 Subject: [PATCH] nak/hw_tests: Explicitly test equal cases in test_isetp64 Part-of: --- src/nouveau/compiler/nak/hw_tests.rs | 32 ++++++++++++++++++---------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/nouveau/compiler/nak/hw_tests.rs b/src/nouveau/compiler/nak/hw_tests.rs index 0e2adf3d3d2..640c9ebc3ce 100644 --- a/src/nouveau/compiler/nak/hw_tests.rs +++ b/src/nouveau/compiler/nak/hw_tests.rs @@ -829,17 +829,27 @@ fn test_isetp64() { let mut a = Acorn::new(); let mut data = Vec::new(); for _ in 0..invocations { - if a.get_bool() { - let high = a.get_u32(); - data.push([a.get_u32(), high, a.get_u32(), high, 0]); - } else { - data.push([ - a.get_u32(), - a.get_u32(), - a.get_u32(), - a.get_u32(), - 0, - ]); + match a.get_u32() % 4 { + 0 => { + // Equal + let high = a.get_u32(); + let low = a.get_u32(); + data.push([low, high, low, high, 0]); + } + 1 => { + // High bits are equal + let high = a.get_u32(); + data.push([a.get_u32(), high, a.get_u32(), high, 0]); + } + _ => { + data.push([ + a.get_u32(), + a.get_u32(), + a.get_u32(), + a.get_u32(), + 0, + ]); + } } }