[PATCH] MATCH: [PR111346] `X CMP MINMAX` pattern missing :c on CMP

Jeff Law jeffreyalaw@gmail.com
Mon Sep 11 02:31:35 GMT 2023



On 9/10/23 20:18, Andrew Pinski via Gcc-patches wrote:
> I noticed this while working on other MINMAX optimizations. It was
> hard to find a simplified testcase though because it was dependent on
> the ssa name versions. Adding the `:c` to cmp allows the pattern to
> be match for the case where minmax as the first operand of the comparison
> rather than the second.
> 
> Committed as obvious after a bootstrap/test on x86_64-linux-gnu.
> 
> 	PR tree-optimization/111346
> 
> gcc/ChangeLog:
> 
> 	* match.pd (`X CMP MINMAX`): Add `:c` on the cmp part
> 	of the pattern
> 
> gcc/testsuite/ChangeLog:
> 
> 	* gcc.dg/tree-ssa/minmaxcmp-1.c: New test.
OK
jeff


More information about the Gcc-patches mailing list