brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 8b10412 Raw
94 lines · plain
1// RUN: not mlir-pdll %s -split-input-file 2>&1 | FileCheck %s2 3// CHECK: expected `{` or `=>` to start pattern body4Pattern }5 6// -----7 8// CHECK: :6:9: error: `Foo` has already been defined9// CHECK: :5:9: note: see previous definition here10Pattern Foo { erase root: Op; }11Pattern Foo { erase root: Op; }12 13// -----14 15// CHECK: `return` statements are only permitted within a `Constraint` or `Rewrite` body16Pattern {17  return _: Value;18}19 20// -----21 22// CHECK: expected Pattern body to terminate with an operation rewrite statement23Pattern {24  let value: Value;25}26 27// -----28 29// CHECK: Pattern body was terminated by an operation rewrite statement, but found trailing statements30Pattern {31  erase root: Op;32  let value: Value;33}34 35// -----36 37// CHECK: expected Pattern lambda body to contain a single operation rewrite statement, such as `erase`, `replace`, or `rewrite`38Pattern => op<>;39 40// -----41 42Rewrite SomeRewrite();43 44// CHECK: unable to invoke `Rewrite` within a match section45Pattern {46  SomeRewrite();47}48 49// -----50 51//===----------------------------------------------------------------------===//52// Metadata53//===----------------------------------------------------------------------===//54 55// CHECK: expected pattern metadata identifier56Pattern with {}57 58// -----59 60// CHECK: unknown pattern metadata61Pattern with unknown {}62 63// -----64 65// CHECK: expected `(` before pattern benefit66Pattern with benefit) {}67 68// -----69 70// CHECK: expected integral pattern benefit71Pattern with benefit(foo) {}72 73// -----74 75// CHECK: expected pattern benefit to fit within a 16-bit integer76Pattern with benefit(65536) {}77 78// -----79 80// CHECK: expected `)` after pattern benefit81Pattern with benefit(1( {}82 83// -----84 85// CHECK: pattern benefit has already been specified86// CHECK: see previous definition here87Pattern with benefit(1), benefit(1) {}88 89// -----90 91// CHECK: pattern recursion metadata has already been specified92// CHECK: see previous definition here93Pattern with recursion, recursion {}94