[PATCH] Add support bswap16 to/from memory compiling to rev16 on ARM/Thumb
Renato Golin
renato.golin at linaro.org
Sat May 10 13:32:12 PDT 2014
On 9 May 2014 23:27, Louis Gerbarg <lgg at apple.com> wrote:
> Currently most __builtin_bswap16() intrinsics from the frontend end up generating sup-optimal code due to legalization promoting some of the operands to i32s during load/stores. That results in the backend generating a rev and an lsr instead of a rev16. This patch adds patterns that catch those situations and generate a rev16.
Hi Louis,
Nice catch. Though, on current trunk, your test2 is already producing
rev16 on both ARM and Thumb.
cheers,
--renato
More information about the llvm-commits
mailing list