[PATCH] D123897: [X86] Unbreak LIT/FileCheck

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 16 11:05:53 PDT 2022


lebedev.ri added a comment.

In D123897#3455496 <https://reviews.llvm.org/D123897#3455496>, @mtrofin wrote:

> In D123897#3455437 <https://reviews.llvm.org/D123897#3455437>, @lebedev.ri wrote:
>
>> In D123897#3455435 <https://reviews.llvm.org/D123897#3455435>, @mtrofin wrote:
>>
>>> In D123897#3455433 <https://reviews.llvm.org/D123897#3455433>, @lebedev.ri wrote:
>>>
>>>> In D123897#3455425 <https://reviews.llvm.org/D123897#3455425>, @mtrofin wrote:
>>>>
>>>>> Added David back - he had some concerns and a good (I think) suggestion. Could this patch do his “UTC_ARGS: —allow-unused-prefixes” suggestion instead? Seems it wouldn't be any bigger of a change, and I think everybody would have their concerns addressed.
>>>>
>>>> Everybody except me? :)
>>>
>>> My understanding is that his proposal will make any test generated with one of the auto-generators automatically enrolled into --allow-unused-prefixes. Wouldn't that address your scenario?
>>
>>
>>
>> 1. It's a workaround for the case of unchanged default. I'm interested in fixing the default, not workarounding it.
>
> I think there are 2 scenarios, please correct me if I misunderstand them (esp. the first):
>
> - I use autogen-ing script, and rely on 'unused prefixes', so I want to just write/update my .ll, run the autogenerator, and be done.
> - I write tests manually, and I can make mistakes (like mean to use a prefix but actually mistakenly not), which I would like to have auto-detected
>
> There are 29164 .ll files under llvm/test, out of which 12449 have the word 'autogenerated' in them, so less than half. If the default were flipped, the onus would be on the manually generated ones to flip it on, which is likely to fail us - people forget, etc. The autogenerated ones both appear to be the main users of allowing unused prefixes, and in the position of opting in to their desired behavior, transparent to the user.

This sounds correct to me.

> That's why I think that 1) leaving the default as-is, and 2) having the autogenerated cases transparently opt in to the behavior they want is win-win.

99.9% of new tests in this directory are autogenerated, thus the diff in question. I find the rest of the questions to be bikeshedding.

>> 2. `UTC_ARGS` controls the default arguments for the `update_llc_test_checks.py` family of checks. Can you please explain how it would happen to affect the FileCheck? Should `update_llc_test_checks.py` rewrite the RUN lines? Or would FileCheck itself  need to be modified to somehow look for it?
>
> I'm learning on the fly about UTC_ARGS, so maybe it's not the right tool for the job; what I mean to say here is captured above, i.e. a feature of the update scripts that automatically opts generated tests to --allow-unused-prefixes (basically, giving the user the transparent experience).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123897/new/

https://reviews.llvm.org/D123897



More information about the llvm-commits mailing list