[compiler-rt] [compiler-rt] Add infrastructure for testing cpuid builtins (PR #101927)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 01:26:41 PST 2024


phoebewang wrote:

> > It's unlike to happen. I imagine the HW spec might be updated after it's disclosed and compiler may fail to catch it.
> 
> Makes sense. Either way, seems like something that would be hard to detect even with decent testing?
> 
> > There was a bot run with SDE, but seems removed from llvm-zorg now.
> 
> Yeah, this doesn't seem too uncommon for some of the bots with specific configurations, hence my concern about limiting the tests by requiring something like SDE.
> 
> Are we able to move forward with this given testing a specific processor's CPU values and asserting microarch/features based on manufacturer documentation should alleviate concerns regarding tests being incorrectly based on the implementation?

I agree the dependency to extra tool is not great, but the method here doesn't look much value to me. In my opinion, a valuable test should serve one or another of below functions:

- Cross verification. The representation is `llvm-test-suite`, hence the SDE proposal;
- Regression test. The representation is the lit tests, but a CPU model info nearly never regresses. So we shouldn't bother to pursuit this way.

https://github.com/llvm/llvm-project/pull/101927


More information about the llvm-commits mailing list