[PATCH] [CodeGenPrepare] Move extractelement close to store if they can be combined.

Quentin Colombet qcolombet at apple.com
Thu Oct 30 18:04:17 PDT 2014


Hi Hal,

Here is the updated version.

Thanks again for the careful review!

Ok to commit?

Cheers,
-Quentin

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:3280
@@ +3279,3 @@
+      // the extract with the store.
+      if (Align < ABIAlignment)
+        return false;
----------------
hfinkel wrote:
> Why are you also checking against the ABI alignment?
Copy-paste-o.

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:3367
@@ +3366,3 @@
+    case Instruction::FRem:
+      return !Use->hasUnsafeAlgebra();
+    }
----------------
hfinkel wrote:
> This should be !Use->hasNoNaNs(); (I'd like to keep us from over-generalizing these kinds of checks and just using 'unsafe algebra' for everything -- we can be more specific here).
Make sense, thanks.

http://reviews.llvm.org/D5921






More information about the llvm-commits mailing list