]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Use canonicalize_comparison in ccmp expansion [PR117346]
authorAndrew Pinski <quic_apinski@quicinc.com>
Tue, 29 Oct 2024 16:16:18 +0000 (09:16 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Tue, 29 Oct 2024 22:34:45 +0000 (15:34 -0700)
commit3d8cd34a450e9ffe2b2ac8a0c8eb33fd5d613483
treef493341b6a881a6927aa1167f9eb75f615d0e5ed
parent3d06e9c3e07e13eab715e19dafbcfc1a0b7e43d6
aarch64: Use canonicalize_comparison in ccmp expansion [PR117346]

While testing the patch for PR 85605 on aarch64, it was noticed that
imm_choice_comparison.c test failed. This was because canonicalize_comparison
was not being called in the ccmp case. This can be noticed without the patch
for PR 85605 as evidence of the new testcase.

Bootstrapped and tested on aarch64-linux-gnu.

PR target/117346

gcc/ChangeLog:

* config/aarch64/aarch64.cc (aarch64_gen_ccmp_first): Call
canonicalize_comparison before figuring out the cmp_mode/cc_mode.
(aarch64_gen_ccmp_next): Likewise.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/imm_choice_comparison-1.c: New test.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/config/aarch64/aarch64.cc
gcc/testsuite/gcc.target/aarch64/imm_choice_comparison-1.c [new file with mode: 0644]