https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393
--- Comment #8 from philipp.tomsich at vrull dot eu --- On Mon, 4 Sept 2023 at 13:38, manolis.tsamis at vrull dot eu < gcc-bugzi...@gcc.gnu.org> wrote: > My current match.pd pattern to do that is below; any feedback or > improvements > are welcome. > > (simplify > (mult (convert@3 (plus @0 INTEGER_CST@1)) INTEGER_CST@2) > (with { tree tt = TREE_TYPE(@3); } > (if (INTEGRAL_TYPE_P (type) > && !TYPE_SATURATING (type) > && !TYPE_OVERFLOW_TRAPS (type) > && !TYPE_OVERFLOW_SANITIZED (type) > && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (@0))) > (plus (mult (convert:tt @0) @2) (mult (convert:tt @1) @2))))) > Please attach a current .patch to this ticket to make sure that there are no surprises in reproducing.