The description of 'cstoremode4' in gccint says:

  "These operations may FAIL, but should do so only in relatively uncommon
   cases; if they would FAIL for common cases involving integer comparisons,
   it is best to restrict the predicates to not allow these operands."

  -- 16.10 Standard Pattern Names For Generation, gccint (the latest)

Therefore, it is preferable to include unsigned comparisons in the operator
constraints of the pattern only if the machine instructions emitted by the
pattern require such comparisons.

gcc/ChangeLog:

        * config/xtensa/predicates.md (xtensa_cstoresi_operator):
        Change it to include unsigned comparisons only when TARGET_SALT is
        enabled.
---
 gcc/config/xtensa/predicates.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md
index 62c0f8aca20..9aebeea255b 100644
--- a/gcc/config/xtensa/predicates.md
+++ b/gcc/config/xtensa/predicates.md
@@ -202,7 +202,9 @@
   (match_code "plus,minus"))
(define_predicate "xtensa_cstoresi_operator"
-  (match_code "eq,ne,gt,ge,lt,le,gtu,geu,ltu,leu"))
+  (if_then_else (match_test "TARGET_SALT")
+               (match_code "eq,ne,gt,ge,lt,le,gtu,geu,ltu,leu")
+               (match_code "eq,ne,gt,ge,lt,le")))
(define_predicate "xtensa_shift_per_byte_operator"
   (match_code "ashift,ashiftrt,lshiftrt"))
--
2.39.5

Reply via email to