By: Patrick Chase (patrickjchase.delete@this.gmai.com), July 6, 2015 9:20 pm
Room: Moderated Discussions
Paul A. Clayton (paaronclayton.delete@this.gmail.com) on July 6, 2015 3:02 pm wrote:
> The compiler should chose a select instruction if the branch is unpredictable.
> If the branch is predictable (or at least if rarely taken), then a branch instruction
> is more appropriate. If the compiler does not know (or the predictability varies
> dynamically), then having the hardware dynamically predicate makes some sense. (Called
> to supper, so will have to come back tomorrow.)
Yes! This is particularly true in an aggressively speculative and OoO core like Cyclone. Widespread predication made sense in static designs (including VLIWs and more recently GPUs), but it generally no longer pays except in totally unpredictable cases. Linus has published some benchmarks demonstrating this for modern x86, and my experience with modern ARM cores is no different.
> The compiler should chose a select instruction if the branch is unpredictable.
> If the branch is predictable (or at least if rarely taken), then a branch instruction
> is more appropriate. If the compiler does not know (or the predictability varies
> dynamically), then having the hardware dynamically predicate makes some sense. (Called
> to supper, so will have to come back tomorrow.)
Yes! This is particularly true in an aggressively speculative and OoO core like Cyclone. Widespread predication made sense in static designs (including VLIWs and more recently GPUs), but it generally no longer pays except in totally unpredictable cases. Linus has published some benchmarks demonstrating this for modern x86, and my experience with modern ARM cores is no different.