[PATCH] D50499: [X86] Constant folding of adds/subs intrinsics

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 11:53:27 PDT 2018


craig.topper accepted this revision.
craig.topper added a comment.
This revision is now accepted and ready to land.

LGTM with those two formatting fixes.



================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:288
+  APInt MinValue = APInt::getSignedMinValue(SVT->getIntegerBitWidth());
+  for (unsigned  i = 0; i < NumElems; ++i) {
+    auto *Elt0 = Arg0->getAggregateElement(i);
----------------
There's an extra space after 'unsigned'


================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:305
+    if (Overflow)
+        ResultElem = Val0.isNegative() ? MinValue : MaxValue;
+    Result.push_back(Constant::getIntegerValue(SVT, ResultElem));
----------------
This is overindented.


Repository:
  rL LLVM

https://reviews.llvm.org/D50499





More information about the llvm-commits mailing list