[mlir][EDSC] Fix off-by-one BlockBuilder insertion point.
authorNicolas Vasilache <ntv@google.com>
Mon, 4 May 2020 20:36:47 +0000 (16:36 -0400)
committerNicolas Vasilache <ntv@google.com>
Tue, 5 May 2020 01:07:48 +0000 (21:07 -0400)
commit036772acfda8658eb737e72dcb4da4298db3bba7
tree47c595af26e2c27c43319f82a30d3518e35cbc9e
parent1e4faf23ffde601679cf8e48a9cd576918a0cf2c
[mlir][EDSC] Fix off-by-one BlockBuilder insertion point.

Summary:
In the particular case of an insertion in a block without a terminator, the BlockBuilder insertion point should be block->end().

Adding a unit test to exercise this.

Differential Revision: https://reviews.llvm.org/D79363
mlir/include/mlir/EDSC/Builders.h
mlir/test/EDSC/builder-api-test.cpp