[PATCH] Take alignment into account for speculative loads

hfinkel at anl.gov hfinkel at anl.gov
Mon Jun 22 19:06:02 PDT 2015


================
Comment at: lib/Analysis/ValueTracking.cpp:2934
@@ +2933,3 @@
+  
+
+  if (!BaseAlign.getBoolValue()) {
----------------
Don't need two new lines here.

================
Comment at: lib/Analysis/ValueTracking.cpp:2935
@@ +2934,3 @@
+
+  if (!BaseAlign.getBoolValue()) {
+    Type *Ty = Base->getType()->getPointerElementType();
----------------
You don't need the getBoolValue() here, APInt has an operator !.

================
Comment at: lib/Analysis/ValueTracking.cpp:2943
@@ +2942,3 @@
+  assert(Alignment.isPowerOf2() && "must be a power of 2!");
+  return BaseAlign.uge(Alignment) && !(Offset & (Alignment-1)).getBoolValue();
+}
----------------
Don't need getBoolValue() here either (or below either).

http://reviews.llvm.org/D9791

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list