Displaying 2 results from an estimated 2 matches for "dpsdqd".
2018 May 09
0
Ignored branch predictor hints
Thanks, interesting.
But a fix needs to be made since branch predictor hints are broken in a
valid C++20 code:
https://godbolt.org/g/dpSDqd
Dňa st 9. 5. 2018, 20:40 David Zarzycki <dave at znu.io> napísal(a):
> Hi Dávid,
>
> Looks like you can defeat the switch conversion by adding a dummy asm(“”):
>
> #define likely(x) __builtin_expect((x),1)
>
> // switch like
> char * b(int e) {
> if (lik...
2018 May 09
2
Ignored branch predictor hints
Hi Dávid,
Looks like you can defeat the switch conversion by adding a dummy asm(“”):
#define likely(x) __builtin_expect((x),1)
// switch like
char * b(int e) {
if (likely(e == 0))
return "0";
asm("");
if (e == 1)
return "1";
else return "f";
}
Dave
> On May 9, 2018, at 2:33 PM, Dávid Bolvanský via llvm-dev