[PATCH] D16915: Fix for bug 26465

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 14:37:41 PST 2016


spatel added a comment.

We need a test case for this path too?
 // Replace ((sub A, B) != C) with (B != A-C) if A & C are constants.

Doesn't affect this patch, but in case you intend to continue working near this code: this function spans ~800 lines; I think it should be broken up at this point. :)


================
Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:2229
@@ -2226,2 +2228,3 @@
       case Instruction::Sub:
         // Replace ((sub A, B) != C) with (B != A-C) if A & C are constants.
+        if (BO->hasOneUse()) {
----------------
I think this comment should be inside the 'if' clause to match the structure of the comment within the 'else if' clause.


Repository:
  rL LLVM

http://reviews.llvm.org/D16915





More information about the llvm-commits mailing list