]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fix aarch64_split_imm24 patterns
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 6 Aug 2025 09:21:55 +0000 (09:21 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 11 Aug 2025 23:25:09 +0000 (23:25 +0000)
commit21d94bf16f124e22fc7ad3c2e4083374eba03c67
tree17a50139ee425b33258bbd8ba774cd496b35b0a4
parented101b98e25314a5a544297e7224d9572b489804
aarch64: Fix aarch64_split_imm24 patterns

Both patterns used !reload_completed as a condition, which is
questionable at best.  The branch pattern failed to include a
clobber of CC_REGNUM.  Both problems were unlikely to trigger
in practice, due to how the optimization pipeline is organized,
but let's fix them anyway.

gcc:
* config/aarch64/aarch64.cc (aarch64_gen_compare_split_imm24): New.
* config/aarch64/aarch64-protos.h: Update.
* config/aarch64/aarch64.md (*aarch64_bcond_wide_imm<GPI>): Use it.
Add match_scratch and cc clobbers.  Use match_operator instead of
iterator expansion.
(*compare_cstore<GPI>_insn): Likewise.
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.cc
gcc/config/aarch64/aarch64.md