TableGen: Fix assert on PatFrags with predicate code
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 30 Dec 2019 17:05:25 +0000 (12:05 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Mon, 30 Dec 2019 19:24:25 +0000 (14:24 -0500)
commit94d08feaeff3591a36ed548ba7c732ddedd6f983
treeeae2f420e6a5c2dbe523e50c1e0ebe59608a46b7
parent47a2fd2df4f4874c28823654be500c3aba93f768
TableGen: Fix assert on PatFrags with predicate code

This assumed a single pattern if there was a predicate. Relax this a
bit, and allow multiple patterns as long as they have the same class.

This was only broken for the DAG path. GlobalISel seems to have
handled this correctly already.
llvm/test/TableGen/predicate-patfags.td [new file with mode: 0644]
llvm/utils/TableGen/CodeGenDAGPatterns.cpp