diff options
| author | Thurston Dang <thurston@google.com> | 2024-12-18 15:53:35 -0800 |
|---|---|---|
| committer | Vitaly Buka <vitalybuka@google.com> | 2024-12-18 15:53:35 -0800 |
| commit | 014a3c31ce7143093d8d1aafc6866e0c8a05a44b (patch) | |
| tree | 09ed7378c44e3692dbe6b7ed283fdac33a16e14b /mlir/lib/TableGen/Predicate.cpp | |
| parent | 97ff599fc6949dc2bac3af7eb3200ebd35990c5a (diff) | |
| parent | 2691b964150c77a9e6967423383ad14a7693095e (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/vitalybuka/spr/main.nfcboundschecking-add-trapbb-local-variable
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'mlir/lib/TableGen/Predicate.cpp')
| -rw-r--r-- | mlir/lib/TableGen/Predicate.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mlir/lib/TableGen/Predicate.cpp b/mlir/lib/TableGen/Predicate.cpp index f71dd0bd35f8..e5cfc074d09f 100644 --- a/mlir/lib/TableGen/Predicate.cpp +++ b/mlir/lib/TableGen/Predicate.cpp @@ -235,6 +235,16 @@ propagateGroundTruth(PredNode *node, return node; } + if (node->kind == PredCombinerKind::And && node->children.empty()) { + node->kind = PredCombinerKind::True; + return node; + } + + if (node->kind == PredCombinerKind::Or && node->children.empty()) { + node->kind = PredCombinerKind::False; + return node; + } + // Otherwise, look at child nodes. // Move child nodes into some local variable so that they can be optimized |
