| 1 |
// PR middle-end/116896 |
| 2 |
// { dg-do compile { target c++20 } } |
| 3 |
// { dg-options "-O2 -masm=att -fno-stack-protector" } |
| 4 |
// { dg-final { scan-assembler-times "\tjp\t" 1 } } |
| 5 |
// { dg-final { scan-assembler-not "\tj\[^mp\]\[a-z\]*\t" } } |
| 6 |
// { dg-final { scan-assembler-times "\tsbb\[bl\]\t\\\$0, " 3 } } |
| 7 |
// { dg-final { scan-assembler-times "\tseta\t" 3 } } |
| 8 |
// { dg-final { scan-assembler-times "\tsetg\t" 1 } } |
| 9 |
// { dg-final { scan-assembler-times "\tsetl\t" 1 } } |
| 10 |
|
| 11 |
#include <compare> |
| 12 |
|
| 13 |
[[gnu::noipa]] auto |
| 14 |
foo (float x, float y) |
| 15 |
{ |
| 16 |
return x <=> y; |
| 17 |
} |
| 18 |
|
| 19 |
[[gnu::noipa, gnu::optimize ("fast-math")]] auto |
| 20 |
bar (float x, float y) |
| 21 |
{ |
| 22 |
return x <=> y; |
| 23 |
} |
| 24 |
|
| 25 |
[[gnu::noipa]] auto |
| 26 |
baz (int x, int y) |
| 27 |
{ |
| 28 |
return x <=> y; |
| 29 |
} |
| 30 |
|
| 31 |
[[gnu::noipa]] auto |
| 32 |
qux (unsigned x, unsigned y) |
| 33 |
{ |
| 34 |
return x <=> y; |
| 35 |
} |