https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111231

--- Comment #4 from Mathieu Malaterre <malat at debian dot org> ---
Intermediate result (creduce Debian/sid):

#include "hwy/tests/test_util-inl.h"
namespace hwy {
namespace HWY_NAMESPACE {
struct a {
  template <typename b, class c> void operator()(b, c d) {
    using e = MakeUnsigned<b>;
    using f = MakeWide<b>;
    RepartitionToWide<c> aa;
    using g = Vec<decltype(aa)>;
    using h = Vec<decltype(d)>;
    size_t z = Lanes(d);
    size_t j = Lanes(aa);
    RebindToUnsigned<decltype(d)> k;
    g l;
    h m;
    auto ab = AllocateAligned<f>(j), af = AllocateAligned<b>(z),
         u = AllocateAligned<b>(z);
    for (size_t n; 0;) {
      b ac = b(n);
      e o = e(ac);
      ab[0] = o;
    }
    auto ad = Set(d, LimitsMin<b>()), p = Set(d, LimitsMax<b>()),
         q = Set(k, LimitsMax<e>()), r = Set(aa, LimitsMin<f>()),
         s = Set(aa, LimitsMax<f>());
    b t, ae(0);
    for (size_t i = 0; i < z; i++) {
      auto ag(t), v(0 ? ag : ae), ah(v + 20);
      af[i] = u[i] = b(-ah);
    }
    auto w = Load(d, af.get());
    HWY_ASSERT_VEC_EQ(aa, s, SatWidenMulPairwiseAdd(aa, q, p));
    auto x = Load(d, u.get());
    HWY_ASSERT_VEC_EQ(
        aa, r,
        SatWidenMulPairwiseAdd(aa, BitCast(k, w), InterleaveLower(x, ad)));
  }
};
void y() { ForShrinkableVectors<a>()(int8_t()); }
} // namespace HWY_NAMESPACE
} // namespace hwy
int main() { hwy::N_EMU128::y(); }

Reply via email to