From: Takayuki 'January June' Suwa Date: Thu, 18 Dec 2025 10:27:15 +0000 (+0900) Subject: xtensa: Make the definition of xtensa_cstoresi_operator more appropriate X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a6d371add9eac51b72f7a9d753ec91502c37d5a;p=thirdparty%2Fgcc.git xtensa: Make the definition of xtensa_cstoresi_operator more appropriate 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. --- 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"))