https://github.com/uweigand commented:

The code changes now look good to me, but the tests still need some work.  In a 
nutshell, most of the tests don't actually seem to verify what you wanted to 
verify.  These are IL tests, that only verify the translation from IL to 
assembler.  You appear to be more interested in the translation from *source* 
to IL - but that isn't actually tested. 

Apparently you generated those tests from source code.  But that means the test 
doesn't actually verify this - if common optimizers change in the future, your 
test will not notice this.  Also, this leads to most of the tests actually not 
being interesting at the IL level - the IL was in some cases fully optimized 
away (due to tautological optimizations), or else many different tests are 
actually the same (or extremely similar) at the IL level.

You should rather design a set of IL tests *starting* with IL, i.e. make sure 
that interesting combinations of IL are actually optimized by the back-end code 
you're adding.

If you do want to add tests that certain source code is transformed to 
particular IL, these should be clang-level test cases.  This may not be very 
useful if that ends up to verify just generic optimizations, but there may be 
some interesting cases remaining (e.g. because optimizers are able to exploit 
the < 4 assertion).

https://github.com/llvm/llvm-project/pull/125970
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to