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

hfinkel at anl.gov hfinkel at anl.gov
Sun Oct 26 01:33:00 PDT 2014


================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:3362
@@ +3361,3 @@
+        if (Opcode == Instruction::SDiv || Opcode == Instruction::UDiv ||
+            Opcode == Instruction::FDiv)
+          return false;
----------------
Also urem, srem, frem

For fdiv and frem, allow the transformation if the instruction has the nnan fast-math flag.

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:3446
@@ +3445,3 @@
+               (Opcode == Instruction::UDiv || Opcode == Instruction::SDiv ||
+                Opcode == Instruction::FDiv)));
+    } else
----------------
Don't repeat this logic; extract it into a function.

http://reviews.llvm.org/D5921






More information about the llvm-commits mailing list