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

Jennifer Schmitz <jschmitz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jschmitz at gcc dot gnu.org

--- Comment #10 from Jennifer Schmitz <jschmitz at gcc dot gnu.org> ---
We are also optimizing ABS expressions and improving codegen for the following
types of test cases (for T in {uint8_t, int8_t, uint16_t, int16_t, uint32_t,
int32_t, uint64_t, int64_t, __uint128_t, __int128_t}):

T src(T x, T y)
{
    T diff1 = x - y;
    T diff2 = y - x;
    return x > y ? diff1 : diff2;
}

T tgt(T x, T y)
{
    T diff = x - y;
    return x > y ? diff : -diff;
}

This seems to be a subset of the transformations described here, so it would
be good to coordinate the work: We have code ready that covers our test cases,
but would also be happy to look at other optimizations mentioned above.

Reply via email to