[TableGen][RISCV] Relax a restriction in generating patterns for commutable SDNodes.
Previously, all children would be checked to see if any were an explicit Register. If anywhere no commutable patterns would be generated. This patch loosens the restriction to only check the children that are being commuted. Digging back through history, this code predates the existence of commutable intrinsics and commutable SDNodes with more than 2 operands. At that time the loop would count the number of children that weren't registers and if that was equal to 2 it would allow commuting. I don't think this loop was re-considered when commutable intrinsics were added or when we allowed SDNodes with more than 2 operands. This important for RISCV were our isel patterns have a V0 mask operand after the commutable operands on some RISCVISD opcodes. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D117955
Loading
Please sign in to comment