Disable coalescing optimizations when using generic target.

The main issue is that they end up generating a number of smaller
vector ops (e.g. 4-wide and 8-wide on the 16-wide generic target,
which the examples/intrinsics implementations don't currently
support.

This fixes a number of failing tests for now; it may be worth
generalizing the stuff in examples/intrinsics at some point,
since as a general principle, e.g. if generating LLVM IR output,
the coalescing optimizations are still desirable.

Issue #175.
This commit is contained in:
Matt Pharr
2012-02-13 16:52:01 -08:00
parent e864447e4a
commit cc86e4a7d2

View File

@@ -392,7 +392,8 @@ Optimize(llvm::Module *module, int optLevel) {
g->target.vectorWidth > 1) {
optPM.add(CreateGSToLoadStorePass());
if (g->opt.disableCoalescing == false) {
if (g->opt.disableCoalescing == false &&
g->target.isa != Target::GENERIC) {
// It is important to run this here to make it easier to
// finding matching gathers we can coalesce..
optPM.add(llvm::createEarlyCSEPass());