From cc86e4a7d2f109518456dc3f656dbf34c1aec02c Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Mon, 13 Feb 2012 16:52:01 -0800 Subject: [PATCH] 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. --- opt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opt.cpp b/opt.cpp index ac0b9c53..e8a49c1f 100644 --- a/opt.cpp +++ b/opt.cpp @@ -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());