[mlir] Fix GPU LaunchFunc conversion to the LLVM dialect
authorAlex Zinenko <zinenko@google.com>
Tue, 7 Sep 2021 12:28:23 +0000 (14:28 +0200)
committerAlex Zinenko <zinenko@google.com>
Tue, 7 Sep 2021 14:50:11 +0000 (16:50 +0200)
commit821262eef210af8675b794fe7efe6d2ed6f81d3a
tree8c2f8368aa986cb1082b8c09b63fb6b16ef3d424
parentbd576e5ac0fc097c16f5c2a900d5c243289a2a8b
[mlir] Fix GPU LaunchFunc conversion to the LLVM dialect

The conversion has been incorrectly using the operands of the original
operation instead of the converted operands provided to the matchAndRewrite
call. This may lead to spurious materializations and generally invalid IR if
the producer of the original operands is deleted in the process of conversion.

Reviewed By: csigg

Differential Revision: https://reviews.llvm.org/D109356
mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp