RE: [PATCH 2/4]AArch64 Add implementation for pow2 bitmask division.

2022-11-09 Thread Kyrylo Tkachov via Gcc-patches
+.4h > +** uaddw v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4h > +** uzp2v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h > +** ... > +*/ > +void draw_bitmap3(uint16_t* restrict pixel, uint16_t level, int n) > +{ > + for (int i = 0; i < (n & -16); i+=1) > +pixel[i] = (pixel[i] * lev

RE: [PATCH 2/4]AArch64 Add implementation for pow2 bitmask division.

2022-11-09 Thread Tamar Christina via Gcc-patches
+** uaddw v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4h > +** uzp2v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h > +** ... > +*/ > +void draw_bitmap3(uint16_t* restrict pixel, uint16_t level, int n) { > + for (int i = 0; i < (n & -16); i+=1) > +pixel[i] = (pixel[i] * level) / 0

RE: [PATCH 2/4]AArch64 Add implementation for pow2 bitmask division.

2022-10-31 Thread Tamar Christina via Gcc-patches
fffUL; +} > -Original Message- > From: Tamar Christina > Sent: Friday, September 23, 2022 10:34 AM > To: gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Marcus Shawcroft ; Kyrylo Tkachov > ; Richard Sandiford > > Subject: [PATCH 2/4]AArch64 Add implementa

[PATCH 2/4]AArch64 Add implementation for pow2 bitmask division.

2022-09-23 Thread Tamar Christina via Gcc-patches
Hi All, This adds an implementation for the new optab for unsigned pow2 bitmask for AArch64. The implementation rewrites: x = y / (2 ^ (sizeof (y)/2)-1 into e.g. (for bytes) (x + ((x + 257) >> 8)) >> 8 where it's required that the additions be done in double the precision of x such that