[PATCH] [Reassociation] Add support for reassociation with unsafe algebra.

Chad Rosier mcrosier at codeaurora.org
Mon Jun 16 13:55:14 PDT 2014


================
Comment at: lib/Transforms/Scalar/Reassociate.cpp:1951-1952
@@ -1847,2 +1950,4 @@
 
-    return;
+    // Don't try to optimize floating point vector instructions or anything
+    // that doesn't have unsafe algebra.
+    if (I->getType()->isVectorTy() || !I->hasUnsafeAlgebra())
----------------
Chad Rosier wrote:
> Chandler Carruth wrote:
> > Why not floating point vector instructions? That seems rather odd to group with testing for fastmath...
> I've already addressed this internally, but I need to rerun correctness and performance.
Turns out that vector instructions are not handled for either integer for floating point instructions.  If you don't mind, I'd prefer to land that change as a separate patch.

http://reviews.llvm.org/D4129






More information about the llvm-commits mailing list