search for: bitwidthc

Displaying 4 results from an estimated 4 matches for "bitwidthc".

Did you mean: bitwidth
2019 Feb 25
2
funnel shift, select, and poison
...<nunoplopes at sapo.pt> wrote: > Thanks Sanjay! > > I did 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. > >...
2019 Feb 25
3
funnel shift, select, and poison
...<nunoplopes at sapo.pt> wrote: > Thanks Sanjay! > > I did 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. > > Howe...
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
...ks Sanjay! > > > > I did 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 po...