Re: [PING] [PATCH v2 2/2] i386: Canonicalize PAVG builtins to IFN_AVG_CEIL [PR122715]
Odysseas Georgoudis <[email protected]>
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <FRWP195MB2864A5804928AE5A55E1CB4ECCDB2@FRWP195MB2864.EURP195.PROD.OUTLOOK.COM> |
Ping for this patch. This is the x86 part of PR122715 v2, reworked to canonicalize PAVG target builtins to IFN_AVG_CEIL as suggested. Bootstrapped on x86_64-pc-linux-gnu; the new x86 tests and existing PAVG tests pass. Is this OK for trunk? Thanks, Odysseas ________________________________ From: Odysseas Georgoudis <[email protected]> Sent: 23 July 2026 02:00 To: Richard Biener <[email protected]> Cc: [email protected] <[email protected]>; [email protected] <[email protected]> Subject: [PATCH v2 2/2] i386: Canonicalize PAVG builtins to IFN_AVG_CEIL [PR122715] This is the x86 part of v2, reworked to canonicalize PAVG target builtins to IFN_AVG_CEIL as suggested. Bootstrapped on x86_64-pc-linux-gnu. The new x86 tests and the existing PAVG tests pass. ________________________________ From: Richard Biener <[email protected]> Sent: 22 July 2026 14:17 To: Odysseas Georgoudis <[email protected]> Cc: [email protected] <[email protected]>; [email protected] <[email protected]> Subject: Re: [PATCH] middle-end, i386: Fold averages with equal operands [PR122715] On Wed, Jul 15, 2026 at 7:43 AM Odysseas Georgoudis <[email protected]> wrote: > > This patch fixes PR middle-end/122715 by folding IFN_AVG_FLOOR (x, x) and IFN_AVG_CEIL (x, x) to x. > > x86 PAVG intrinsics are represented by target builtins instead of IFN_AVG_CEIL. The patch therefore also folds calls with equal operands in ix86_gimple_fold_builtin. For masked forms, the fold is applied only when every lane is enabled by the mask. The match.pd / gimple testcase part is OK. Please split the x86 target part to a separate patch (we might want to instead fold the target builtin to the internal function call?) Thanks, Richard. > Bootstrapped on x86_64-pc-linux-gnu. The new tests and the existing PAVG focused tests pass. The target-independent match.pd fold was also tested using an AArch64 cross-compiler.