Displaying 4 results from an estimated 4 matches for "isfshl".
Did you mean:
fshl
2019 Feb 25
2
funnel shift, select, and poison
...ptimization below. It
> actually stops poison if shift amount is zero:
> SDValue ShAmt = DAG.getNode(ISD::UREM, sdl, VT, Z, BitWidthC);
> (...)
> SDValue IsZeroShift = DAG.getSetCC(sdl, CCVT, ShAmt, Zero, ISD::SETEQ);
> setValue(&I, DAG.getSelect(sdl, VT, IsZeroShift, IsFSHL ? X : Y, Or));
>
> This is assuming select in SDAG stops poison in the same way we've
> proposed
> for the IR.
>
> However, the lowering has 2 optimizations. It can lower funnel shifts to:
> 1) A special funnel shift instruction if the backend supports it
> 2) Rotate
>...
2019 Feb 25
3
funnel shift, select, and poison
...ptimization below. It
> actually stops poison if shift amount is zero:
> SDValue ShAmt = DAG.getNode(ISD::UREM, sdl, VT, Z, BitWidthC);
> (...)
> SDValue IsZeroShift = DAG.getSetCC(sdl, CCVT, ShAmt, Zero, ISD::SETEQ);
> setValue(&I, DAG.getSelect(sdl, VT, IsZeroShift, IsFSHL ? X : Y, Or));
>
> This is assuming select in SDAG stops poison in the same way we've proposed
> for the IR.
>
> However, the lowering has 2 optimizations. It can lower funnel shifts to:
> 1) A special funnel shift instruction if the backend supports it
> 2) Rotate
>
>...
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
2019 Feb 26
2
funnel shift, select, and poison
...hift amount is zero:
> > SDValue ShAmt = DAG.getNode(ISD::UREM, sdl, VT, Z, BitWidthC);
> > (...)
> > SDValue IsZeroShift = DAG.getSetCC(sdl, CCVT, ShAmt, Zero,
> > ISD::SETEQ);
> > setValue(&I, DAG.getSelect(sdl, VT, IsZeroShift, IsFSHL ? X :
> > Y, Or));
> >
> > This is assuming select in SDAG stops poison in the same way we've
> > proposed
> > for the IR.
> >
> > However, the lowering has 2 optimizations. It can lower funnel
> > shifts to:
> >...