llvm-project/mlir/test/IR
Renato Golin 5010b5b7e6 Check type for forward reference definition
The types of forward references are checked that they match with other
uses, but they do not check they match with the definition.

    func @forward_reference_type_check() -> (i8) {
      br ^bb2

    ^bb1:
      return %1 : i8

    ^bb2:
      %1 = "bar"() : () -> (f32)
      br ^bb1
    }

Would be parsed and the use site of '%1' would be silently changed to
'f32'.

This commit adds a test for this case, and a check during parsing for
the types to match.

Patch by Matthew Parkinson <mattpark@microsoft.com>

Closes D79317.
2020-05-06 14:34:18 +01:00
..
affine-map.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
attribute.mlir Make ops with StructAttr's actually verify `isa<TheStruct>`. 2020-04-28 14:00:18 -07:00
check-help-output.mlir Add custom lilith script. 2019-03-29 13:02:57 -07:00
core-ops.mlir [MLIR] Add complex numbers to standard dialect 2020-05-04 14:04:28 +00:00
dense-elements-hex.mlir [mlir][DenseElementsAttr] Add support for opaque APFloat/APInt complex values. 2020-05-05 12:42:37 -07:00
diagnostic-handler.mlir [mlir][Diagnostics] Don't print note source line if it is the same as the previous diagnostic 2020-03-29 21:43:44 -07:00
invalid-affinemap.mlir [mlir] Change the syntax of AffineMapAttr and IntegerSetAttr to avoid conflicts with function types. 2020-01-13 13:24:39 -08:00
invalid-func-op.mlir Rename the current parseSymbolName to parseOptionalSymbolName 2019-11-13 09:32:20 -08:00
invalid-locations.mlir Rename -verify mlir-opt flag to -verify-expected-diagnostics 2019-06-19 23:08:03 -07:00
invalid-module-op.mlir Move ModuleManager functionality into mlir::SymbolTable. 2019-12-05 03:56:46 -08:00
invalid-ops.mlir [mlir] Harden verifiers for DMA ops 2020-05-05 20:40:41 +02:00
invalid.mlir Check type for forward reference definition 2020-05-06 14:34:18 +01:00
locations.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
memory-ops.mlir [MLIR] Add missing colon after CHECKs. 2020-04-08 11:16:06 +02:00
module-op.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
op-stats.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
opaque_locations.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
operand.mlir Split test-specific passes out of mlir-opt 2019-06-24 17:47:12 -07:00
parser.mlir [mlir][DenseElementsAttr] Add support for opaque APFloat/APInt complex values. 2020-05-05 12:42:37 -07:00
pretty-attributes.mlir Print out large elementsattr's such that they are parseable. 2019-12-04 10:19:54 -08:00
pretty-locations.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
pretty-region-args.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
print-op-local-scope.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
print-op-on-diagnostic.mlir [mlir][IR] Manually register command line options for MLIRContext and AsmPrinter 2020-04-11 23:13:00 -07:00
region.mlir [mlir][ODS] Add support for variadic regions. 2020-04-05 01:03:38 -07:00
repro_b120295301.mlir Change the attribute dictionary syntax to separate name and value with '='. 2019-06-25 19:06:34 -07:00
result.mlir Split test-specific passes out of mlir-opt 2019-06-24 17:47:12 -07:00
test-func-erase-arg.mlir Add FuncOp::eraseArgument 2019-11-13 10:59:55 -08:00
test-func-set-type.mlir Add FuncOp::eraseArgument 2019-11-13 10:59:55 -08:00
test-matchers.mlir [mlir] Add a new context flag for disabling/enabling multi-threading 2020-05-02 12:32:25 -07:00
test-side-effects.mlir [mlir][SideEffects] Define a set of interfaces and traits for defining side effects 2020-03-06 14:04:36 -08:00
test-symbol-rauw.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
test-symbol-uses.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
traits.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
wrapping_op.mlir Add a flag on the context to protect against creation of operations in unregistered dialects 2020-03-30 19:37:31 +00:00
zero_whitespace.mlir Isolate zero_whitespace parser test into its own file. 2020-04-22 19:58:40 -07:00