From 712719a2ae797197b4d5592e66a8530cd42af8aa Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 30 Apr 2026 09:39:17 -0400 Subject: [PATCH] jay: do moves on the float pipe where possible this allows us to use accumulators more. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Kenneth Graunke Part-of: --- src/intel/compiler/jay/jay_lower_post_ra.c | 12 ++++++++++++ src/intel/compiler/jay/test/test-lower-post-ra.cpp | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/jay/jay_lower_post_ra.c b/src/intel/compiler/jay/jay_lower_post_ra.c index 36480770296..7eb0d80a6c3 100644 --- a/src/intel/compiler/jay/jay_lower_post_ra.c +++ b/src/intel/compiler/jay/jay_lower_post_ra.c @@ -78,6 +78,18 @@ lower(jay_builder *b, jay_inst *I) } } + /* Do moves on the float point to promote accumulator usage */ + if (I->type == JAY_TYPE_U32 && + I->dst.file == GPR && + jay_def_stride(b->shader, I->dst) == JAY_STRIDE_4 && + ((I->src[0].file == GPR && + jay_def_stride(b->shader, I->src[0]) == JAY_STRIDE_4) || + I->src[0].file == UGPR || + jay_is_imm(I->src[0]))) { + + I->type = JAY_TYPE_F32; + } + return false; } diff --git a/src/intel/compiler/jay/test/test-lower-post-ra.cpp b/src/intel/compiler/jay/test/test-lower-post-ra.cpp index 209d944f347..0b9935df5ab 100644 --- a/src/intel/compiler/jay/test/test-lower-post-ra.cpp +++ b/src/intel/compiler/jay/test/test-lower-post-ra.cpp @@ -77,6 +77,6 @@ TEST_F(LowerPostRA, RewriteToSel) TEST_F(LowerPostRA, CopyUGPR) { - NEGCASE(jay_MOV(b, x, u4)); + CASE(jay_MOV(b, x, u4), jay_MOV(b, x, u4)->type = JAY_TYPE_F32); NEGCASE(jay_MOV(b, u4, x)); }