Displaying 4 results from an estimated 4 matches for "ccvt".
Did you mean:
ccv
2019 Feb 25
2
funnel shift, select, and poison
...d a quick study of these funnel shifts:
> The generic lowering to SDAG is correct for the optimization 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 shi...
2019 Feb 25
3
funnel shift, select, and poison
...d a quick study of these funnel shifts:
> The generic lowering to SDAG is correct for the optimization 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 t...
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
...The generic lowering to SDAG is correct for the optimization 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.
> &...