]> git.ipfire.org Git - thirdparty/gcc.git/commit
AArch64: relax cbranch tests to accepted inverted branches [PR113502]
authorTamar Christina <tamar.christina@arm.com>
Wed, 31 Jan 2024 14:52:59 +0000 (14:52 +0000)
committerTamar Christina <tamar.christina@arm.com>
Wed, 31 Jan 2024 14:52:59 +0000 (14:52 +0000)
commitf7935beef7b02fbba0adf33fb2ba5c0a27d7e9ff
tree5d2c5b01d3ac0d294b13b0482d7881c7730dd7d0
parent0a640455928a050315f6addd88ace5d945eba130
AArch64: relax cbranch tests to accepted inverted branches [PR113502]

Recently something in the midend had started inverting the branches by inverting
the condition and the branches.

While this is fine, it makes it hard to actually test.  In RTL I disable
scheduling and BB reordering to prevent this.  But in GIMPLE there seems to be
nothing I can do.  __builtin_expect seems to have no impact on the change since
I suspect this is happening during expand where conditions can be flipped
regardless of probability during compare_and_branch.

Since the mid-end has plenty of correctness tests, this weakens the backend
tests to just check that a correct looking sequence is emitted.

gcc/testsuite/ChangeLog:

PR testsuite/113502
* gcc.target/aarch64/sve/vect-early-break-cbranch.c: Ignore exact branch.
* gcc.target/aarch64/vect-early-break-cbranch.c: Likewise.
gcc/testsuite/gcc.target/aarch64/sve/vect-early-break-cbranch.c
gcc/testsuite/gcc.target/aarch64/vect-early-break-cbranch.c