summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2015-11-07 18:47:40 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2015-11-07 18:58:58 -0500
commitaf218217d71152df8562b7f087086197f28080fe (patch)
treed8ee786a119c6e65b54bc221d2bc0164103ce033 /src
parent53cbb11707a502a31bb9f0380d730840245ee9b2 (diff)
downloadexternal_mesa3d-af218217d71152df8562b7f087086197f28080fe.zip
external_mesa3d-af218217d71152df8562b7f087086197f28080fe.tar.gz
external_mesa3d-af218217d71152df8562b7f087086197f28080fe.tar.bz2
nv50/ir: only take abs value when computing high result
Not reachable from TGSI since it only has UMUL, no IMUL. However it's surprising that setting argument types to s32 will cause sign to get lost. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
index eec502b..75164ef 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -75,7 +75,7 @@ expandIntegerMUL(BuildUtil *bld, Instruction *mul)
s[0] = mul->getSrc(0);
s[1] = mul->getSrc(1);
- if (isSignedType(mul->sType)) {
+ if (isSignedType(mul->sType) && highResult) {
s[0] = bld->getSSA(fullSize);
s[1] = bld->getSSA(fullSize);
bld->mkOp1(OP_ABS, mul->sType, s[0], mul->getSrc(0));