Displaying 4 results from an estimated 4 matches for "funnel_shift".
2019 Feb 25
2
funnel shift, select, and poison
Don't we need to distinguish funnel shift from the more specific rotate?
I'm not seeing how rotate (a single input op shifted by some amount) gets
into trouble like funnel shift (two variables concatenated and shifted by
some amount).
Eg, if in pseudo IR we have:
%funnel_shift = fshl %x, %y, %sh ; this is problematic because either x or
y can be poison, but we may not touch the poison when sh==0
%rotate = fshl %x, %x, %sh ; if x is poison, the op is unquestionably
producing poison; there's no sh==0 loophole here
On Mon, Feb 25, 2019 at 1:12 PM Nuno Lopes <nunopl...
2019 Feb 25
3
funnel shift, select, and poison
...; Don't we need to distinguish funnel shift from the more specific rotate?
> I'm not seeing how rotate (a single input op shifted by some amount) gets
> into trouble like funnel shift (two variables concatenated and shifted by
> some amount).
> Eg, if in pseudo IR we have:
> %funnel_shift = fshl %x, %y, %sh ; this is problematic because either x or
> y
> can be poison, but we may not touch the poison when sh==0
> %rotate = fshl %x, %x, %sh ; if x is poison, the op is unquestionably
> producing poison; there's no sh==0 loophole here
>
>
>
> On Mon, Feb 25,...
2019 Feb 26
2
funnel shift, select, and poison
...tate?
> > I'm not seeing how rotate (a single input op shifted by some amount)
> > gets
> > into trouble like funnel shift (two variables concatenated and
> > shifted by
> > some amount).
> > Eg, if in pseudo IR we have:
> > %funnel_shift = fshl %x, %y, %sh ; this is problematic because
> > either x or y
> > can be poison, but we may not touch the poison when sh==0
> > %rotate = fshl %x, %x, %sh ; if x is poison, the op is unquestionably
> > producing poison; there's no sh==0 loophole here...
2019 Feb 25
4
funnel shift, select, and poison
There's a question about the behavior of funnel shift [1] + select and
poison here that reminds me of previous discussions about select and poison
[2]:
https://github.com/AliveToolkit/alive2/pull/32#discussion_r257528880
Example:
define i8 @fshl_zero_shift_guard(i8 %x, i8 %y, i8 %sh) {
%c = icmp eq i8 %sh, 0
%f = fshl i8 %x, i8 %y, i8 %sh
%s = select i1 %c, i8 %x, i8 %f ; shift amount is 0