lkml.org 
[lkml]   [2015]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] x86: clean up unnecessarily wide TEST insns
Date
Denys Vlasenko <dvlasenk@redhat.com> writes:

> By the nature of TEST operation, it is often possible
> to test a narrower part of the operand:
> "testl $3, mem" -> "testb $3, mem",
> "testq $3, %rcx" -> "testb $3, %cl"
> This results in shorter insns, because TEST insn has no
> sign-entending byte-immediate forms unlike other ALU ops.

It also results in expensive LCP stalls. Please don't do it.
If you feel the need to change instructions around like this read
the optimization manuals first.

-Andi

--
ak@linux.intel.com -- Speaking for myself only


\
 
 \ /
  Last update: 2015-03-06 23:41    [W:0.050 / U:1.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site