diff options
author | Robin Dapp <rdapp@linux.ibm.com> | 2022-02-07 08:39:41 +0100 |
---|---|---|
committer | Robin Dapp <rdapp@linux.ibm.com> | 2022-03-01 08:51:30 +0100 |
commit | 2240ebd8e46e098f972a662d0aad85348b304889 (patch) | |
tree | 4dccfc2541a277e450e3221dbdf8bdba59c8d451 /gcc | |
parent | e2385690a3ead66744e51115966f25f9c05bb3e2 (diff) | |
download | gcc-2240ebd8e46e098f972a662d0aad85348b304889.zip gcc-2240ebd8e46e098f972a662d0aad85348b304889.tar.gz gcc-2240ebd8e46e098f972a662d0aad85348b304889.tar.bz2 |
arc: Fix for new ifcvt behavior [PR104154]
ifcvt now passes a CC-mode "comparison" to backends. This patch
simply returns from gen_compare_reg () in that case since nothing
needs to be prepared anymore.
gcc/ChangeLog:
PR rtl-optimization/104154
* config/arc/arc.cc (gen_compare_reg): Return the CC-mode
comparison ifcvt passed us.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/arc/arc.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc index c27ba99..fbc17e6 100644 --- a/gcc/config/arc/arc.cc +++ b/gcc/config/arc/arc.cc @@ -2256,6 +2256,12 @@ gen_compare_reg (rtx comparison, machine_mode omode) cmode = GET_MODE (x); if (cmode == VOIDmode) cmode = GET_MODE (y); + + /* If ifcvt passed us a MODE_CC comparison we can + just return it. It should be in the proper form already. */ + if (GET_MODE_CLASS (cmode) == MODE_CC) + return comparison; + if (cmode != SImode && cmode != SFmode && cmode != DFmode) return NULL_RTX; if (cmode == SImode) |