[mlir] Fix argument attribute attribute reassignment in ConvertStandardToLLVM
authorAlex Zinenko <zinenko@google.com>
Fri, 14 Feb 2020 09:18:19 +0000 (10:18 +0100)
committerAlex Zinenko <zinenko@google.com>
Fri, 14 Feb 2020 09:22:33 +0000 (10:22 +0100)
commit39cb2a8fc79976171b20369ff756f7fa43232b50
treedf942c0557d912f42645f6586aea0cd0b446e183
parent189c701332eb2d80c0bf6bf132abeb4e1ec9e6ce
[mlir] Fix argument attribute attribute reassignment in ConvertStandardToLLVM

The commit switching the calling convention for memrefs (5a1778057)
inadvertently introduced a bug in the function argument attribute conversion:
due to incorrect indexing of function arguments it was not assigning the
attributes to the arguments beyond those generated from the first original
argument. This was not caught in the commit since the test suite does have a
test for converting multi-argument functions with argument attributes. Fix the
bug and add relevant tests.
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
mlir/test/Conversion/StandardToLLVM/convert-static-memref-ops.mlir