[PATCH] D121727: [NVPTX] Integrate ptxas to LIT tests
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 18 14:44:30 PDT 2022
jhenderson added a comment.
In D121727#3393386 <https://reviews.llvm.org/D121727#3393386>, @jdenny wrote:
> In D121727#3393335 <https://reviews.llvm.org/D121727#3393335>, @jhenderson wrote:
>
>> Of course, this above has a lot of duplicated code, so it might be nice to make the if an if/else ternary-style. Spitball idea:
>>
>> RUN: ... | FileCheck %s --check-prefix={%if windows {WINDOWS} else {NON-WINDOWS}}
>
> I like this direction as it seems more flexible. Why do we need the outermost braces?
Because the `else` might be optional, so it clearly delineates the if/else block, as opposed to something using the term "else" immediately after the if part. I'm open to other suggestions on this though.
>> Bonus points would allow this if to span multiple lines. Maybe this:
>>
>> RUN: {%if feature { \
>> RUN: command1; \
>> RUN: command2 | \
>> RUN: command3}}
>
> Might be nice if the `\` is not required so it's possible to enclose multiple existing RUN lines without having to join them with `;`, `&&`, etc.
Agreed, though I don't have a clear view of how this might work, since the RUN lines are done pre-subsititution (I think, not actually checked), and I see this "if" style as a kind of conditionalised substitution.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121727/new/
https://reviews.llvm.org/D121727
More information about the llvm-commits
mailing list