Paul Gilmartin wrote:
On Fri, 14 Dec 2007 08:04:50 -0800, Edward Jaffe wrote:
"BC/BRC-type are statically predicted not-taken (except if the mask is
'F'x), BCT, BXLE, and BXH-type are statically guessed taken.  For
BC/BRC-type this is correct about 55% of the time for most code and
BCT/BXLE-type are correct 90+% of the time on the static prediciton."

Shame on me for jumping in on on of these "Which instruction sequence
is more efficient?" threads.  But, then, if the programer (or compiler)
knows from independent considerations that the branch prediction logic
will be wrong, is it worthwhile to code a conditional branch with the
complementary mask around an unconditional branch?  Is this often done?

This would only be a serious consideration for branches in highly performance-sensitive code that are statically predicted taken, but are not taken -- and, therefore, not remembered by the BTB. Few branches fit into that category. I would guess it is rarely done.

--
Edward E Jaffe
Phoenix Software International, Inc
5200 W Century Blvd, Suite 800
Los Angeles, CA 90045
310-338-0400 x318
[EMAIL PROTECTED]
http://www.phoenixsoftware.com/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to