31 lines · plain
1// RUN: llvm-tblgen %s | FileCheck %s2// RUN: not llvm-tblgen -DERROR %s 2>&1 | FileCheck --check-prefix=ERROR %s3 4def op;5def otherop;6 7def test {8 // CHECK: dag d = (? "hello":$world);9 dag d = (? "hello":$world);10 11 // CHECK: dag undefNeither = (op 1, 2);12 dag undefNeither = !con((op 1), (op 2));13 // CHECK: dag undefFirst = (op 1, 2);14 dag undefFirst = !con((? 1), (op 2));15 // CHECK: dag undefSecond = (op 1, 2);16 dag undefSecond = !con((op 1), (? 2));17 // CHECK: dag undefBoth = (? 1, 2);18 dag undefBoth = !con((? 1), (? 2));19 // CHECK: dag namedLHS = (op:$lhs 1, 2);20 dag namedLHS = !con((op:$lhs 1), (op 2));21 // CHECK: dag namedRHS = (op:$rhs 1, 2);22 dag namedRHS = !con((op 1), (op:$rhs 2));23 // CHECK: dag namedBoth = (op:$lhs 1, 2);24 dag namedBoth = !con((op:$lhs 1), (op:$rhs 2));25 26#ifdef ERROR27 // ERROR: Concatenated Dag operators do not match: '(op 1)' vs. '(otherop 2)'28 dag mismatch = !con((op 1), (otherop 2));29#endif30}31