On 2/14/2026 1:28 PM, Andrew Pinski wrote:
On Sat, Feb 14, 2026 at 3:48 AM Daniel Barboza
<[email protected]> wrote:
Add a new helper that handles mispredicts in the following bit ops
scenarios:

- checking if a bitmask is not set, and in this case set it: always set
   the bitmask;
- checking if a bitmask is set, and in this case clear it: always clear
   the bitmask.

Bootstrapped and tested with x86_64-pc-linux-gnu.
This is NOT a full review, just something which caught my eye.
And just a note, the goal here is to clean up that mispredict  in bitmap_{set,clear}_bit which shows up in spec2017's 502.gcc.    Andi fixed it up by changing the sources of those routines for our tree, but obviously that doesn't help spec2017 :-)

This was either the #1 or #2 source of mispredicts in at least one input of 502.gcc, hence the focus on trying to cleanly if-convert it and eliminate the branch.

Jeff

Reply via email to