================
@@ -1,3 +1,6 @@
-__kernel void foo(int *i) {
+// RUN: %clang -emit-llvm -S -o - %s | FileCheck %s
----------------
frasercrmck wrote:

Yes, I was hoping to explore in that direction. I've kind of just copied the 
skeleton of the LIT tests we have downstream, but as you say, this isn't really 
workable as it assumes all tests will be able to use the same CHECK.

I think, for this to work, we'd have to configure LIT with all of the `libclc` 
targets (or, a subset we're interested in), then `RUN` each test multiple times 
with a unique `FileCheck` check prefix for each target. Then when running 
`update_cc_test_checks` it'd run the test on all targets.

I think we'd need a macro or substitution to expand a single `RUN` line to 
multiple architectures, to keep things maintainable.

We could also allow running the tests on just the one or a subset of 
architectures locally, using a `--param` to control the architectures to test.

Does that sound like a good direction? to take this in?

https://github.com/llvm/llvm-project/pull/87989
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to