https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124019
--- Comment #5 from Jeffrey A. Law <law at gcc dot gnu.org> --- Then that's a target issue HP. >From a canonicalization standpoint Andrew's approach is sound and checking RTX costs is inappropriate here as we're in gimple and very much want to avoid introducing those kinds of target dependencies into gimple. If there are tests in the testsuite which show the behavior you're looking for or want to avoid, that would be a huge help to help ensure that canonicalization isn't regressing on cris or other targets with similar properties.
