4 ms·
The optimization here would be CSE or hoisting, or both? I'm guessing the problem is those are performed prior to vectorization. In other words, I suspect an i
by phkahler 4y ago
The optimization here would be CSE or hoisting, or both? I'm guessing the problem is those are performed prior to vectorization.
In other words, I suspect an invariant calculation inside consecutive loops but that is not vectorized will be pulled out of the loops and also moved prior to them and executed just once.
- JonChesterfield 4y agoAt a guess, constant rematerialision failing to cross basic block boundaries. Feels like a plausible thing for a heuristic to miss. E.g. sink the constant into the loop so it's available when optimising that block, then fail to hoist it back out afterwards because constant materialisation is cheap.