Displaying 3 results from an estimated 3 matches for "shift_amount".
2018 Jul 02
2
Rotates, once again
On 7/2/2018 3:16 PM, Sanjay Patel wrote:
> I also agree that the per-element rotate for vectors is what we want for
> this intrinsic.
>
> So I have this so far:
>
> declare i32 @llvm.catshift.i32(i32 %a, i32 %b, i32 %shift_amount)
> declare <2 x i32> @llvm.catshift.v2i32(<2 x i32> %a, <2 x i32> %b, <2 x i32> %shift_amount)
>
> For scalars, @llvm.catshift concatenates %a and %b, shifts the
> concatenated value right by the number of bits specified by
> %shift_amount modulo the...
2018 Jul 02
2
Rotates, once again
1. I'm not sure what you mean by "full vector" here - using the same
shift distance for all lanes (as opposed to per-lane distances), or
doing a treat-the-vector-as-bag-of-bits shift that doesn't have any
internal lane boundaries? If the latter, that doesn't really help you
much with implementing a per-lane rotate.
I think the most useful generalization of a vector
2019 Feb 25
3
funnel shift, select, and poison
We have these transforms from funnel shift to a simpler shift op:
// fshl(X, 0, C) -> shl X, C
// fshl(X, undef, C) -> shl X, C
// fshl(0, X, C) -> lshr X, (BW-C)
// fshl(undef, X, C) -> lshr X, (BW-C)
These were part of: https://reviews.llvm.org/D54778
In all cases, one operand must be 0 or undef and the shift amount is a
constant, so I think these are safe.