Commit 7ff83e6
committed
oracle: confirm the u64 rotate refusal is the OPERATION, not the idiom
Rung 6 of the ladder rests on one measurement: a scalar u64 rotate loop does
not vectorize. That used a single source form -- u64::rotate_right(n) -- which
leaves an obvious objection open. Maybe LLVM declines the rotate IDIOM at
64-bit width and an explicit shift-or would vectorize, exactly as it does for
u32's rotate_left(12)/(7). AVX2 has vpsllq/vpsrlq, so the ingredients exist.
Tested. It does not.
rot_u64x8 u64::rotate_right(n) runtime 0 packed
shiftor_rot_u64x8 (x >> n) | (x << (64-n)) runtime 0 packed
shiftor_rot_const_u64x8 explicit shift-or CONST 0 packed
The third row is the sharp one. At u32 width a constant amount vectorizes two
different ways depending on granularity -- byte-granular to vpshufb,
bit-granular to the shift-or triple -- and both are packed. At u64 width
neither happens, for either kind of constant.
A fourth confirmation arrived unasked. A blake2b_g_shiftor_u64x8 probe was
written as the direct counterpart to blake2b_g_u64x8; it never appeared in the
emitted assembly. LLVM FOLDED the two functions -- zero mentions of the shiftor
symbol, two call sites on the survivor -- proving the spellings are
byte-identical rather than merely both-scalar. Removed rather than kept as a
permanently-failing row: a probe the compiler cannot distinguish from its own
control measures nothing. The removal and its reason are recorded in the probe
file and the baseline so the next reader does not re-add it.
Net: rung 6 is confirmed as the crate's one earned intrinsic override, now on
three independent spellings instead of one.1 parent 712a6a6 commit 7ff83e6
3 files changed
Lines changed: 121 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
89 | 118 | | |
90 | 119 | | |
91 | 120 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
496 | 541 | | |
497 | 542 | | |
498 | 543 | | |
| |||
651 | 696 | | |
652 | 697 | | |
653 | 698 | | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
654 | 724 | | |
655 | 725 | | |
656 | 726 | | |
| |||
0 commit comments