Add the unconditional branch instruction, improve diagnostics for block
references.

PiperOrigin-RevId: 201872745
diff --git a/test/IR/parser-errors.mlir b/test/IR/parser-errors.mlir
index 288222b..e572fa2 100644
--- a/test/IR/parser-errors.mlir
+++ b/test/IR/parser-errors.mlir
@@ -6,18 +6,39 @@
 ; Check different error cases.
 ; TODO(jpienaar): This is checking the errors by simplify verifying the output.
 ; -----
+
 ; CHECK: expected type
 ; CHECK-NEXT: illegaltype
 extfunc @illegaltype(i42)
+
 ; -----
 ; CHECK: expected type
 ; CHECK-NEXT: nestedtensor
 extfunc @nestedtensor(tensor<tensor<i8>>) -> ()
+
 ; -----
 ; CHECK: expected '{' in CFG function
 cfgfunc @foo()
 cfgfunc @bar()
+
 ; -----
 ; CHECK: expected a function identifier like
 ; CHECK-NEXT: missingsigil
 extfunc missingsigil() -> (i1, int, f32)
+
+
+; -----
+
+cfgfunc @bad_branch() {
+bb42:
+  br missing  ; CHECK: error: reference to an undefined basic block 'missing'
+}
+
+; -----
+
+cfgfunc @block_redef() {
+bb42:
+  return
+bb42:        ; CHECK: error: redefinition of block 'bb42'
+  return
+}