https://gcc.gnu.org/g:8a6d371add9eac51b72f7a9d753ec91502c37d5a
commit r16-6272-g8a6d371add9eac51b72f7a9d753ec91502c37d5a Author: Takayuki 'January June' Suwa <[email protected]> Date: Thu Dec 18 19:27:15 2025 +0900 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: --- 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 62c0f8aca208..9aebeea255b6 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"))
