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

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
AFAIU, at gimple level support is limited to vectors, so that doesn't help to
generate the insn for the simple, scalar case.

It would be nice if combine could generate it and we wouldn't have to use a
peephole, but AFAIU the pattern is too complex for that.

I wonder if reformulating using a conditional could help there (ptx isa
describes semantics using "c + ((a<b) ? b-a : a-b)".

Also, I wonder if defining a stepping-stone intermediate pattern could help
combine.

Reply via email to