http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48263
--- Comment #2 from Hans-Peter Nilsson <hp at gcc dot gnu.org> 2011-03-24 01:15:14 UTC --- (In reply to comment #1) > I don't know if this is a bug in optabs or a target issue. An optabs issue. > But what is happening is that since ior is an commutative, it checks if it can > swap the operands to allow them. But it is not swapping the operands in the > end. Which is presumably the bug, IMO. > The following patch to cris.md works and makes it more like most other > targets: But wrong. That operand needs to be a register just as it currently says; there's no valid insn where operand 1 is something else. Tweaking the md by making the predicates sloppier is just papering over the bug, but I admit the patch does show the issue.