summaryrefslogtreecommitdiff
path: root/src/amd/compiler/aco_optimizer.cpp
diff options
context:
space:
mode:
authorGeorg Lehmann <dadschoorse@gmail.com>2023-03-24 13:35:07 +0100
committerMarge Bot <emma+marge@anholt.net>2023-03-30 03:34:34 +0000
commit3907c54443dfc3c7b09cbea1efcae90a76b4c6b0 (patch)
tree3589b88d33d5114ccab24b49043fe1745013ecaf /src/amd/compiler/aco_optimizer.cpp
parentace017bba87948e12c7450706255c0601fdbbae4 (diff)
downloadmesa-3907c54443dfc3c7b09cbea1efcae90a76b4c6b0.tar.gz
aco: don't label mul with opsel as abs/neg
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22069>
Diffstat (limited to 'src/amd/compiler/aco_optimizer.cpp')
-rw-r--r--src/amd/compiler/aco_optimizer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index 294651a9895..4abf14b26df 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -1840,7 +1840,7 @@ label_instruction(opt_ctx& ctx, aco_ptr<Instruction>& instr)
for (unsigned i = 0; i < 2; i++) {
if (instr->operands[!i].isConstant() && instr->operands[i].isTemp()) {
- if (!instr->isDPP() && !instr->isSDWA() &&
+ if (!instr->isDPP() && !instr->isSDWA() && !instr->valu().opsel &&
(instr->operands[!i].constantEquals(fp16 ? 0x3c00 : 0x3f800000) || /* 1.0 */
instr->operands[!i].constantEquals(fp16 ? 0xbc00 : 0xbf800000u))) { /* -1.0 */
bool neg1 = instr->operands[!i].constantEquals(fp16 ? 0xbc00 : 0xbf800000u);