From 9f1ad7d2f39c078f7921118d0050607a77d989a1 Mon Sep 17 00:00:00 2001 From: Georg Lehmann Date: Tue, 17 Sep 2024 19:09:16 +0200 Subject: [PATCH] aco/vn: handle sz/inf/nan preserve Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_opt_value_numbering.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/amd/compiler/aco_opt_value_numbering.cpp b/src/amd/compiler/aco_opt_value_numbering.cpp index 039d36527c8..d5be9e9302d 100644 --- a/src/amd/compiler/aco_opt_value_numbering.cpp +++ b/src/amd/compiler/aco_opt_value_numbering.cpp @@ -385,6 +385,12 @@ process_block(vn_ctx& ctx, Block& block) ctx.renames[instr->definitions[i].tempId()] = orig_instr->definitions[i].getTemp(); if (instr->definitions[i].isPrecise()) orig_instr->definitions[i].setPrecise(true); + if (instr->definitions[i].isSZPreserve()) + orig_instr->definitions[i].setSZPreserve(true); + if (instr->definitions[i].isInfPreserve()) + orig_instr->definitions[i].setInfPreserve(true); + if (instr->definitions[i].isNaNPreserve()) + orig_instr->definitions[i].setNaNPreserve(true); /* SPIR_V spec says that an instruction marked with NUW wrapping * around is undefined behaviour, so we can break additions in * other contexts.