summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau/codegen
diff options
context:
space:
mode:
authorM Henning <drawoc@darkrefraction.com>2022-03-20 00:23:46 -0400
committerMarge Bot <emma+marge@anholt.net>2022-03-20 05:35:06 +0000
commitc36f3f2db823337955d5a866d66556a69901da0b (patch)
tree89d250e227c83379e6b3fea93e86e854a3b50b3b /src/gallium/drivers/nouveau/codegen
parentd12e16fc3b5217613aa077f5f3418f16cf5cb824 (diff)
nouveau: Fix out-of-bounds access in AlgebraicOpt
for cases where we calculate the absolute value of the result of a unary operation We can remove this problematic check since it's redundant with the one several lines down. Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15476>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index 42b2d0cd972..c440670b3be 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -1835,9 +1835,6 @@ AlgebraicOpt::handleABS(Instruction *abs)
if (!sub ||
!prog->getTarget()->isOpSupported(OP_SAD, abs->dType))
return;
- // expect not to have mods yet, if we do, bail
- if (sub->src(0).mod || sub->src(1).mod)
- return;
// hidden conversion ?
ty = intTypeToSigned(sub->dType);
if (abs->dType != abs->sType || ty != abs->sType)