]> git.ipfire.org Git - thirdparty/gcc.git/commit
simplify-rtx: fix riscv redundant-bitmap-2.C
authorAlexandre Oliva <oliva@adacore.com>
Thu, 5 Feb 2026 02:48:55 +0000 (23:48 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 5 Feb 2026 02:48:55 +0000 (23:48 -0300)
commitbd848fa1d8968ffbbc783c70bdecd8b365085e95
tree4b7ed5256f6f3ae82ea849100749bb26800e7f6d
parentd931a18247130376de4ecd7543934b5a2d9ae287
simplify-rtx: fix riscv redundant-bitmap-2.C

The insn simplification expected by the test, to get a bset
instruction, has been prevented since r15-9239, because we get rotates
for bit clear and shifts for bit flip, and we don't know how to
simplify those.

Teach the rtl simplifier, at the spots where it had been extended to
handle these logical simplifications, to also handle these less
obvious negations.

for  gcc/ChangeLog

* simplify-rtx.cc (negated_ops_p): New.
(simplify_context::simplify_binary_operation_1): Use it.
gcc/simplify-rtx.cc