]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end: Optimize (A&C)^(B&C) to (A^B)&C in simplify_rtx (take 3).
authorRoger Sayle <roger@nextmovesoftware.com>
Mon, 29 Jun 2020 16:33:23 +0000 (17:33 +0100)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:15:25 +0000 (13:15 -0300)
commit2b72c738b16112ce13ce7bf6e0cafd308f0f812c
treef3d4392aec1f7d652c2962888cffcd6f1c78f970
parent4b341beec6d47bed0e1fa6030c0c0718f5f6bdcf
middle-end: Optimize (A&C)^(B&C) to (A^B)&C in simplify_rtx (take 3).

2020-06-29  Roger Sayle  <roger@nextmovesoftware.com>
gcc/ChangeLog:
* simplify-rtx.c (simplify_distributive_operation): New function
to un-distribute a binary operation of two binary operations.
(X & C) ^ (Y & C) to (X ^ Y) & C, when C is simple (i.e. a constant).
(simplify_binary_operation_1) <IOR, XOR, AND>: Call it from here
when appropriate.
(test_scalar_int_ops): New function for unit self-testing
scalar integer transformations in simplify-rtx.c.
(test_scalar_ops): Call test_scalar_int_ops for each integer mode.
(simplify_rtx_c_tests): Call test_scalar_ops.
gcc/simplify-rtx.c