[PATCH] D47113: [CVP] Teach CorrelatedValuePropagation to reduce the width of lshr instruction.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 21 09:49:05 PDT 2018


reames added a comment.

Minor code/style comments only.  Leaving the broader discussion to engaged parties.



================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:603
+
+  // What is maximal value for the first operand? Might be a constant.
+  APInt RHS = getUnsignedMaxVal(/*Operand=*/1);
----------------
minor: second operand


================
Comment at: lib/Transforms/Scalar/CorrelatedValuePropagation.cpp:648
 
+  // Try to process our new lshr.
+  processLShr(BO, LVI);
----------------
You're repeating a pattern which is already there, but we should probably introduce an iteration outside the processX functions for this.


Repository:
  rL LLVM

https://reviews.llvm.org/D47113





More information about the llvm-commits mailing list