RFC: what is the purpose of test/CodeGen/Generic?

Hi all,

I wonder about this directory and the 162 tests that are in it.

Most tests have only this run line: ; RUN: llc < %s

And when I look at the log of some tests like: test/CodeGen/Generic/2002-04-14-UnexpectedUnsignedType.ll
The comment inside is:

; This caused the backend to assert out with:
; SparcInstrInfo.cpp:103: failed assertion `0 && "Unexpected unsigned type”’

I doubt we are effectively testing the Sparc backend unless you run the validation on a Sparc.

Since “CodeGen” can’t really be generic (you’ll need a target), I’m not sure what is intended to be in it. I’d like to move most of the tests in their associated backend directory, but I’d like to hear what is legit to be here?

Thanks,

Mehdi

Some of the tests are used to test the command line options in llc and the behavior of the LLVMTargetMachine class, like stop-after.ll and run-pass.ll. I think that they are expected to work on every target and should stay here.

Cheers,
Alex

Agreed :slight_smile:

-eric

Ok for these, that is probably a small fraction of the 162 test in here :slight_smile:

In the meantime here are two patches to require “native” feature available for these tests (and others):

http://reviews.llvm.org/D11730
http://reviews.llvm.org/D11731

(need reviewers)

Thanks,