]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
xtensa: Simplify "*masktrue_const_bitcmpl" insn pattern
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Sun, 24 Aug 2025 21:27:43 +0000 (06:27 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Mon, 25 Aug 2025 14:55:08 +0000 (07:55 -0700)
gcc/ChangeLog:

* config/xtensa/xtensa.md
(The auxiliary define_split for *masktrue_const_bitcmpl):
Use a more concise function call, i.e.,
(1 << GET_MODE_BITSIZE (mode)) - 1 is equivalent to
GET_MODE_MASK (mode).

gcc/config/xtensa/xtensa.md

index 4a02a6efe51ab3d9002e641632059c74278dbfbe..64a4fafa31b607c6b7aeb7416679c0b72a58d8b7 100644 (file)
                      (label_ref (match_dup 1))
                      (pc)))]
 {
-  operands[3] = GEN_INT ((1 << GET_MODE_BITSIZE (GET_MODE (operands[3]))) - 1);
+  operands[3] = GEN_INT (GET_MODE_MASK (GET_MODE (operands[3])));
 })
 
 (define_insn_and_split "*masktrue_const_pow2_minus_one"