llvmpipe/draw: always enable LLVMAddInstructionCombiningPass()
authorBrian Paul <brianp@vmware.com>
Wed, 20 Oct 2010 20:47:32 +0000 (14:47 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 20 Oct 2010 20:49:07 +0000 (14:49 -0600)
We were working around an LLVM 2.5 bug but we're using LLVM 2.6 or later now.
This basically reverts commit baddcbc5225e12052b3bc8c07a8b65243d76574d.
This fixes the piglit bug/tri-tex-crash.c failure.

src/gallium/auxiliary/draw/draw_llvm.c
src/gallium/drivers/llvmpipe/lp_jit.c

index 4ad570950fcb3ceb7b940f2a5669691c2c9cbea0..f8fd17fe2c4c8a27d0c3b231533044436f9721d4 100644 (file)
@@ -274,13 +274,7 @@ draw_llvm_create(struct draw_context *draw)
          LLVMAddConstantPropagationPass(llvm->pass);
       }
 
-      if(util_cpu_caps.has_sse4_1) {
-         /* FIXME: There is a bug in this pass, whereby the combination of fptosi
-          * and sitofp (necessary for trunc/floor/ceil/round implementation)
-          * somehow becomes invalid code.
-          */
-         LLVMAddInstructionCombiningPass(llvm->pass);
-      }
+      LLVMAddInstructionCombiningPass(llvm->pass);
       LLVMAddGVNPass(llvm->pass);
    } else {
       /* We need at least this pass to prevent the backends to fail in
index e09ec504ab705097d6ce805e3fb1e5627c1ea702..4dbb12c999b22814d1c56d6fd81a3c3440f26998 100644 (file)
@@ -187,13 +187,7 @@ lp_jit_screen_init(struct llvmpipe_screen *screen)
       LLVMAddCFGSimplificationPass(screen->pass);
       LLVMAddPromoteMemoryToRegisterPass(screen->pass);
       LLVMAddConstantPropagationPass(screen->pass);
-      if(util_cpu_caps.has_sse4_1) {
-         /* FIXME: There is a bug in this pass, whereby the combination of fptosi
-          * and sitofp (necessary for trunc/floor/ceil/round implementation)
-          * somehow becomes invalid code.
-          */
-         LLVMAddInstructionCombiningPass(screen->pass);
-      }
+      LLVMAddInstructionCombiningPass(screen->pass);
       LLVMAddGVNPass(screen->pass);
    } else {
       /* We need at least this pass to prevent the backends to fail in