Skip to content

Commit

Permalink
Revert "aarch64: Fuse CMP+CSEL and CMP+CSET for -mcpu=neoverse-v2"
Browse files Browse the repository at this point in the history
This reverts commit 4c5eb66.
  • Loading branch information
ktkachov committed Jul 24, 2024
1 parent 4c5eb66 commit 39562dd
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 90 deletions.
2 changes: 0 additions & 2 deletions gcc/config/aarch64/aarch64-fusion-pairs.def
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,5 @@ AARCH64_FUSION_PAIR ("aes+aesmc", AES_AESMC)
AARCH64_FUSION_PAIR ("alu+branch", ALU_BRANCH)
AARCH64_FUSION_PAIR ("alu+cbz", ALU_CBZ)
AARCH64_FUSION_PAIR ("addsub_2reg_const1", ADDSUB_2REG_CONST1)
AARCH64_FUSION_PAIR ("cmp+csel", CMP_CSEL)
AARCH64_FUSION_PAIR ("cmp+cset", CMP_CSET)

#undef AARCH64_FUSION_PAIR
19 changes: 0 additions & 19 deletions gcc/config/aarch64/aarch64.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27348,25 +27348,6 @@ aarch_macro_fusion_pair_p (rtx_insn *prev, rtx_insn *curr)
&& reg_referenced_p (SET_DEST (prev_set), PATTERN (curr)))
return true;

/* FUSE CMP and CSEL. */
if (aarch64_fusion_enabled_p (AARCH64_FUSE_CMP_CSEL)
&& prev_set && curr_set
&& GET_CODE (SET_SRC (prev_set)) == COMPARE
&& GET_CODE (SET_SRC (curr_set)) == IF_THEN_ELSE
&& REG_P (XEXP (SET_SRC (curr_set), 1))
&& REG_P (XEXP (SET_SRC (curr_set), 2))
&& reg_referenced_p (SET_DEST (prev_set), PATTERN (curr)))
return true;

/* Fuse CMP and CSET. */
if (aarch64_fusion_enabled_p (AARCH64_FUSE_CMP_CSET)
&& prev_set && curr_set
&& GET_CODE (SET_SRC (prev_set)) == COMPARE
&& GET_RTX_CLASS (GET_CODE (SET_SRC (curr_set))) == RTX_COMPARE
&& REG_P (SET_DEST (curr_set))
&& reg_referenced_p (SET_DEST (prev_set), PATTERN (curr)))
return true;

/* Fuse flag-setting ALU instructions and conditional branch. */
if (aarch64_fusion_enabled_p (AARCH64_FUSE_ALU_BRANCH)
&& any_condjump_p (curr))
Expand Down
5 changes: 1 addition & 4 deletions gcc/config/aarch64/tuning_models/neoversev2.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,7 @@ static const struct tune_params neoversev2_tunings =
2 /* store_pred. */
}, /* memmov_cost. */
5, /* issue_rate */
(AARCH64_FUSE_AES_AESMC
| AARCH64_FUSE_CMP_BRANCH
| AARCH64_FUSE_CMP_CSEL
| AARCH64_FUSE_CMP_CSET), /* fusible_ops */
(AARCH64_FUSE_AES_AESMC | AARCH64_FUSE_CMP_BRANCH), /* fusible_ops */
"32:16", /* function_align. */
"4", /* jump_align. */
"32:16", /* loop_align. */
Expand Down
34 changes: 0 additions & 34 deletions gcc/testsuite/gcc.target/aarch64/cmp_csel_fuse.c

This file was deleted.

31 changes: 0 additions & 31 deletions gcc/testsuite/gcc.target/aarch64/cmp_cset_fuse.c

This file was deleted.

0 comments on commit 39562dd

Please sign in to comment.