https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113744
Hongtao Liu <liuhongt at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liuhongt at gcc dot gnu.org --- Comment #2 from Hongtao Liu <liuhongt at gcc dot gnu.org> --- 7018; For comparisons against 1, -1 and 128, we may generate better code 7019; by converting cmp to add, inc or dec as done by peephole2. This pattern 7020; is matched then. We can't accept general immediate, because for 7021; case of overflows, the result is messed up. 7022; Also carry flag is reversed compared to cmp, so this conversion is valid 7023; only for comparisons not depending on it. 7024 It sounds to me those peephole2 can be extended to memory operand since APX_NDD supports that. So it's not redudant m constraint in the pattern, but miss optimization in those peepholes.