[flang] Set attribute at the correct position
authorValentin Clement <clementval@gmail.com>
Thu, 18 Aug 2022 18:21:21 +0000 (20:21 +0200)
committerValentin Clement <clementval@gmail.com>
Thu, 18 Aug 2022 18:21:41 +0000 (20:21 +0200)
commitb8535b5908ecde5a10f1e0e592bc9e6ed5b02a56
tree135600a20cfaae0ab00f486fccd5d45e2c19e12d
parentb8709a9d03f8ba28146f612aa47cc25a44d0723e
[flang] Set attribute at the correct position

The TargetRewrite pass can change the number of argument of a function.
An extra llvm.nest attribute is added and was not set at the correct position
if an extra argument was inserted before.

Reviewed By: PeteSteinfeld

Differential Revision: https://reviews.llvm.org/D132113
flang/lib/Optimizer/CodeGen/TargetRewrite.cpp
flang/test/Fir/target-rewrite-arg-position.fir [new file with mode: 0644]