Summary: | uint32_t load is not recognized if shifts are done in a fixed-size loop | ||
---|---|---|---|
Product: | gcc | Reporter: | Nikita Kniazev <nok.raven> |
Component: | tree-optimization | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | NEW --- | ||
Severity: | enhancement | CC: | gabravier, goon.pri.low, segher |
Priority: | P3 | Keywords: | missed-optimization |
Version: | 9.0 | ||
Target Milestone: | --- | ||
Host: | x86_64 | Target: | x86_64 |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2021-09-04 00:00:00 | |
Bug Depends on: | |||
Bug Blocks: | 94094 |
Description
Nikita Kniazev
2019-03-24 18:31:15 UTC
Unrolling happens too late for bswap. On PowerPC, for "bad" we get addi 9,3,2 lbz 0,1(3) lbz 3,0(3) lhbrx 10,0,9 rlwimi 0,10,8,0,31-8 rlwimi 3,0,8,0,31-8 rldicl 3,3,0,32 blr (BE -m64); it managed to recognise the top two bytes as a byte-reverse load, but not the lower two. (And yup, "loop" uses no byte-reverse at all.) |