[llvm-dev] Rotates, once again
Krzysztof Parzyszek via llvm-dev
llvm-dev at lists.llvm.org
Wed May 16 08:58:33 PDT 2018
On 5/15/2018 5:34 PM, Sanjay Patel via llvm-dev wrote:
> Thanks for writing this up. I'd like to have this intrinsic too.
I'd vote for the "valign" variant that David proposed. It becomes a
rotate when both inputs are the same.
<ty> %result = @llvm.valign.<ty>(<ty> %a0, <ty> %a1, i32 s)
result = truncate (concat(a1,a0) >> s)
Where "concat" concatenates the bits of both inputs to form a value of a
twice as long type, and "truncate" takes the lower half of the bits of
its input.
-Krzysztof
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
More information about the llvm-dev
mailing list