From d42244ab9d22db6d4041430cd8c4ff5b34e231a6 Mon Sep 17 00:00:00 2001 From: Avimitin Date: Tue, 7 Nov 2023 17:38:10 +0800 Subject: [PATCH] [build system] add tablegen patch We need this patch to bypass the incorrect behaviour when running tablegen. View details in llvm-project issue #68166. Signed-off-by: Avimitin --- nix/tblgen.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 nix/tblgen.patch diff --git a/nix/tblgen.patch b/nix/tblgen.patch new file mode 100644 index 000000000..4d3a9c0b9 --- /dev/null +++ b/nix/tblgen.patch @@ -0,0 +1,14 @@ +diff --git a/llvm/utils/TableGen/GlobalISelEmitter.cpp b/llvm/utils/TableGen/GlobalISelEmitter.cpp +index 8d9ded1b2ac5..e8765e8bc3c9 100644 +--- a/llvm/utils/TableGen/GlobalISelEmitter.cpp ++++ b/llvm/utils/TableGen/GlobalISelEmitter.cpp +@@ -770,9 +770,6 @@ Expected GlobalISelEmitter::createAndImportSelDAGMatcher( + + if (Predicate.hasGISelPredicateCode()) { + if (Predicate.usesOperands()) { +- assert(WaitingForNamedOperands == 0 && +- "previous predicate didn't find all operands or " +- "nested predicate that uses operands"); + TreePattern *TP = Predicate.getOrigPatFragRecord(); + WaitingForNamedOperands = TP->getNumArgs(); + for (unsigned i = 0; i < WaitingForNamedOperands; ++i)