forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9c79e64
committed
Frob numeric.c loop so that clang will auto-vectorize it too.
Experimentation shows that clang will auto-vectorize the criticalmultiplication loop if the termination condition is written "i2 < limit"rather than "i2 <= limit". This seems unbelievably stupid, but I'vereproduced it on both clang 9.0.1 (RHEL8) and 11.0.3 (macOS Catalina).gcc doesn't care, so tweak the code to do it that way.Discussion:https://postgr.es/m/CAJ3gD9evtA_vBo+WMYMyT-u=keHX7-r8p2w7OSRfXf42LTwCZQ@mail.gmail.com1 parent87e6ed7 commit9c79e64
1 file changed
+8
-6
lines changedLines changed: 8 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8191 | 8191 |
| |
8192 | 8192 |
| |
8193 | 8193 |
| |
8194 |
| - | |
8195 | 8194 |
| |
8196 | 8195 |
| |
8197 | 8196 |
| |
| |||
8327 | 8326 |
| |
8328 | 8327 |
| |
8329 | 8328 |
| |
8330 |
| - | |
| 8329 | + | |
8331 | 8330 |
| |
8332 | 8331 |
| |
8333 | 8332 |
| |
| |||
8336 | 8335 |
| |
8337 | 8336 |
| |
8338 | 8337 |
| |
8339 |
| - | |
8340 |
| - | |
8341 |
| - | |
8342 |
| - | |
| 8338 | + | |
| 8339 | + | |
| 8340 | + | |
| 8341 | + | |
| 8342 | + | |
| 8343 | + | |
| 8344 | + | |
8343 | 8345 |
| |
8344 | 8346 |
| |
8345 | 8347 |
| |
|
0 commit comments
Comments
(0)