[PATCH] D28384: Update update_test_checks to work properly with phi nodes and other fun things.

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 10:10:26 PST 2017


On Fri, Jan 6, 2017 at 8:47 AM, bryant via Phabricator <
reviews at reviews.llvm.org> wrote:

> bryant added a comment.
>
> drive-by comment.
>
>
>
> ================
> Comment at: utils/update_test_checks.py:176
> +      if match.group(1) in vars_seen:
> +        line = line.replace('%' + match.group(1),
> get_value_use(match.group(1)), 1)
> +        continue
> ----------------
> You're limiting the number of replaced uses to 1. Can a line have more
> than one use?
>

Yes, but you want to replace one at a time anyway.


because it could be a use of "bb", and the line could be phi [a, bb], [b,
bb17], [c, bb].

If you replace  all uses of bb, you'll mistakenly replace bb17.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170106/ee97fa1d/attachment.html>


More information about the llvm-commits mailing list