https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122665
--- Comment #6 from Segher Boessenkool <segher at gcc dot gnu.org> ---
(In reply to Roger Sayle from comment #5)
> My apologies for commenting on this so late, but have you considered using
> the RTX codes for highpart multiplication, SMUL_HIGHPART and UMUL_HIGHPART,
> instead of an rs6000-specific UNSPEC?
Yup, please do, "it's always nicer to describe what happens", unspecs are
just your last resort :-) They *always* work, but the abstraction and/or
generality also make you lose something.
> Using the standard RTX then allows
> the RTL optimizers to simplify/evaluate this expression at compile-time.
Exactly!
> Indeed the {S,U}MUL_HIGHPART RTX codes were added because (Segher pointed
> out) the rs6000 backend used some ver y dubious patterns to define them.
I did? I'd almost ask you to point me down memory lane to remind me, but some
things are better forgotten I guess :-)