Closed dinuxbg closed 8 years ago
How much cpu cycles are in the first and second case ?
Two an one cycle, respectively.
All PRU instructions take one cycle to execute, except the load/store instructions.
Looks like AArch64 is having the same issue: http://www.slideshare.net/linaroorg/hkg15405-redundant-zerosignextension-elimination-in-gcc . On to reading the aarch64 machine description...
The following C snippet:
Will compile to the inefficient (but still correct):
Instead of the more-optimal: