[PATCH] D55263: [CodeGen][ExpandMemcmp] Add an option for allowing overlapping loads.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 14 00:35:32 PST 2018


RKSimon added a comment.

A couple of minor style issues I noticed



================
Comment at: lib/CodeGen/ExpandMemCmp.cpp:141
+        ++NumLoadsNonOneByte;
+      }
+      Size = Size % LoadSize;
----------------
Remove braces


================
Comment at: lib/CodeGen/ExpandMemCmp.cpp:167
+  // is larger than the max allowed.
+  if (NumNonOverlappingLoads + !!(Size > 0) > MaxNumLoads)
+    return {};
----------------
Add brackets to make this logic more obvious - don't rely on people's understanding of operator precedence!


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55263/new/

https://reviews.llvm.org/D55263





More information about the llvm-commits mailing list