GBE: optimize IMM handling for SEL/SEL_CMP/CMP.
authorZhigang Gong <zhigang.gong@intel.com>
Wed, 14 May 2014 06:58:32 +0000 (14:58 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Fri, 23 May 2014 11:09:41 +0000 (19:09 +0800)
commitc3c3a343dee75c16fb793366c2aa4d7711db6430
tree9929d1c378767f0340b295f7c72e145328914923
parent8b6cd119e4267d2acd9b1153a18a31d1fc60dd9a
GBE: optimize IMM handling for SEL/SEL_CMP/CMP.

Actually, all of the above 3 instructions could avoid
one LOADI instruction by switching operands position.

This patch impemented this optimization. And consolidate
all the same type of optimization into one place.

No obvious performance impact on luxmark.

v2:
fix some wrong indent.
v3:
fix the OP_ORD issue. OP_ORD use both src0/src1 as both src0/src1
so can't use this IMM optimization.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
backend/src/backend/gen_insn_selection.cpp