From e5bf153d4f483efa1f671ce93404d6694bcf2453 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 20 Apr 2026 11:06:01 -0400 Subject: [PATCH] jay/lower_post_ra: drop old 2<-->8 lowering this XOR based lowering is no longer needed. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/intel/compiler/jay/jay_lower_post_ra.c | 38 +++------------------- 1 file changed, 5 insertions(+), 33 deletions(-) diff --git a/src/intel/compiler/jay/jay_lower_post_ra.c b/src/intel/compiler/jay/jay_lower_post_ra.c index adadf65741e..5c82e537c7a 100644 --- a/src/intel/compiler/jay/jay_lower_post_ra.c +++ b/src/intel/compiler/jay/jay_lower_post_ra.c @@ -35,13 +35,6 @@ lower_non_tied_default(jay_builder *b, jay_inst *I, jay_def default_) } } -static inline jay_def -hi(jay_def x) -{ - x.hi = true; - return x; -} - static bool lower(jay_builder *b, jay_inst *I) { @@ -60,33 +53,9 @@ lower(jay_builder *b, jay_inst *I) return true; if (I->dst.file == GPR && I->src[0].file == GPR) { - jay_def dst = I->dst, src = I->src[0], tmp4 = jay_bare_reg(GPR, 0); + jay_def dst = I->dst, src = I->src[0]; enum jay_stride dst_stride = jay_def_stride(b->shader, dst); enum jay_stride src_stride = jay_def_stride(b->shader, src); - assert(jay_def_stride(b->shader, tmp4) == JAY_STRIDE_4 && "ABI"); - - if (dst_stride == JAY_STRIDE_8 && src_stride == JAY_STRIDE_2) { - jay_MOV(b, dst, tmp4); - jay_MOV(b, tmp4, src)->type = JAY_TYPE_U16; - jay_MOV(b, hi(tmp4), hi(src))->type = JAY_TYPE_U16; - - jay_XOR(b, JAY_TYPE_U32, dst, dst, tmp4); - jay_XOR(b, JAY_TYPE_U32, tmp4, dst, tmp4); - jay_XOR(b, JAY_TYPE_U32, dst, dst, tmp4); - return true; - } else if (dst_stride == JAY_STRIDE_2 && src_stride == JAY_STRIDE_8) { - jay_MOV(b, dst, tmp4)->type = JAY_TYPE_U16; - jay_MOV(b, hi(dst), hi(tmp4))->type = JAY_TYPE_U16; - jay_MOV(b, tmp4, src); - - for (unsigned i = 0; i < 3; ++i) { - jay_XOR(b, JAY_TYPE_U16, i == 1 ? tmp4 : dst, dst, tmp4); - jay_XOR(b, JAY_TYPE_U16, i == 1 ? hi(tmp4) : hi(dst), hi(dst), - hi(tmp4)); - } - - return true; - } /* Lower 4B<-->2B copies. To pack the register file, RA * sometimes inserts 32-bit copies involving 16-bit strided sources like @@ -100,7 +69,10 @@ lower(jay_builder *b, jay_inst *I) if (stride_sz < type_sz) { assert(stride_sz == 16 && type_sz == 32 && "no other case hit"); I->type = JAY_TYPE_U16; - jay_MOV(b, hi(dst), hi(src))->type = JAY_TYPE_U16; + + dst.hi = true; + src.hi = true; + jay_MOV(b, dst, src)->type = JAY_TYPE_U16; } }