diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2025-08-04 22:47:05 +1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2025-08-11 23:25:09 +0000 |
commit | 2af897e11b358fccb978e3a96b2899ce193bcd25 (patch) | |
tree | 6a94a5560c7f08cdfe301443dd8f62bbd12f4c0b | |
parent | 23b878dfa293d1ab8d6dc0e2fdc79c91b82c0215 (diff) | |
download | gcc-2af897e11b358fccb978e3a96b2899ce193bcd25.zip gcc-2af897e11b358fccb978e3a96b2899ce193bcd25.tar.gz gcc-2af897e11b358fccb978e3a96b2899ce193bcd25.tar.bz2 |
aarch64: Consider TARGET_CMPBR in rtx costs
gcc:
* config/aarch64/aarch64.cc (aarch64_if_then_else_costs):
Use aarch64_cb_rhs to match CB insns.
-rw-r--r-- | gcc/config/aarch64/aarch64.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index d527229..e4a9e87 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -14460,6 +14460,15 @@ aarch64_if_then_else_costs (rtx op0, rtx op1, rtx op2, int *cost, bool speed) *cost += extra_cost->alu.arith * 2; return true; } + + if (TARGET_CMPBR) + { + *cost += rtx_cost (inner, cmpmode, cmpcode, 0, speed); + if ((cmpmode != SImode && cmpmode != DImode) + || !aarch64_cb_rhs (cmpcode, comparator)) + *cost += rtx_cost (comparator, cmpmode, cmpcode, 1, speed); + return true; + } } else if (GET_MODE_CLASS (GET_MODE (inner)) == MODE_CC) { |