From: David Schleef Date: Thu, 3 Jun 2010 06:00:23 +0000 (-0700) Subject: sse: don't emit spurious moves X-Git-Tag: orc-0.4.5~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7aee86ec2471b3931ba9e3a4edcfc0f6c1093af2;p=platform%2Fupstream%2Forc.git sse: don't emit spurious moves --- diff --git a/orc/orcrules-sse.c b/orc/orcrules-sse.c index 4a0618f..1e6b5ad 100644 --- a/orc/orcrules-sse.c +++ b/orc/orcrules-sse.c @@ -90,6 +90,10 @@ orc_sse_emit_loadpq (OrcCompiler *p, int reg, int param) static void sse_rule_copyx (OrcCompiler *p, void *user, OrcInstruction *insn) { + if (p->vars[insn->src_args[0]].alloc == p->vars[insn->dest_args[0]].alloc) { + return; + } + orc_sse_emit_movdqa (p, p->vars[insn->src_args[0]].alloc, p->vars[insn->dest_args[0]].alloc); diff --git a/orc/orcsse.c b/orc/orcsse.c index 1522ee6..d250950 100644 --- a/orc/orcsse.c +++ b/orc/orcsse.c @@ -239,6 +239,10 @@ orc_x86_emit_mov_sse_memoffset (OrcCompiler *compiler, int size, int reg1, int o void orc_x86_emit_mov_sse_reg_reg (OrcCompiler *compiler, int reg1, int reg2) { + if (reg1 == reg2) { + return; + } + ORC_ASM_CODE(compiler," movdqa %%%s, %%%s\n", orc_x86_get_regname_sse(reg1), orc_x86_get_regname_sse(reg2));