From: Benjamin Segovia Date: Wed, 7 Nov 2012 01:47:26 +0000 (-0800) Subject: Added a additional rule for MADs. When we try to avoid spilling, we do not X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=deadb3ded0a13b9718f2ab1fd58d38b37e88a2b9;p=contrib%2Fbeignet.git Added a additional rule for MADs. When we try to avoid spilling, we do not generate MADs --- diff --git a/backend/src/backend/gen_insn_selection.cpp b/backend/src/backend/gen_insn_selection.cpp index 343ff0d..36db1a3 100644 --- a/backend/src/backend/gen_insn_selection.cpp +++ b/backend/src/backend/gen_insn_selection.cpp @@ -1110,6 +1110,13 @@ namespace gbe virtual bool emit(Selection::Opaque &sel, SelectionDAG &dag) const { using namespace ir; + + // MAD tend to increase liveness of the sources (since there are three of + // them) + if (sel.ctx.limitRegisterPressure) + return false; + + // We are good to try. We need a MUL for one of the two sources const ir::BinaryInstruction &insn = cast(dag.insn); if (insn.getType() != TYPE_FLOAT) return false;