how to test the correct of the llvm backend

Hi,everyone
I am a beginner for llvm , now I am writing a llvm backend,I want to know how to test the correctness of llvm backend .
Thank you

Hi,everyone
   I am a beginner for llvm , now I am writing a llvm backend,I want to know how to test the correctness of llvm backend .
Thank you

You could try compiling programs from the llvm test-suite and see if they
work, or you could write lit tests. See test/CodeGen/X86 for examples.

-Tom

My personal experience writing a LLVM backend for Octasic is that a good commercial C/C++ compiler validation test suite will catch the most bug. Especially corner cases.

If you can’t afford one then you could try the GCC torture test.