[PATCH] D16915: Fix for bug 26465

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 15:18:43 PST 2016

spatel accepted this revision.
spatel added a comment.

In http://reviews.llvm.org/D16915#345405, @twoh wrote:

> @spatel, I don't think we need a test case for "Replace ((sub A, B) != C) with (B != A-C) if A & C are constants." in this diff, because only the order of if statements is changed for that case.

Ah, yes. I missed that the check for that case already exists.

> Totally agree on you that the function is too long. Maybe a separate diff for that?

Certainly - that was just a suggestion to make future changes easier.

Comment at: lib/Transforms/InstCombine/InstCombineCompares.cpp:2215-2216
@@ -2214,3 +2214,4 @@
       case Instruction::Xor:
         // For the xor case, we can xor two constants together, eliminating
         // the explicit xor.
+        if (BO->hasOneUse()) {
Sorry - I missed this comment too. Please move it lower to match the format of the other cases.


More information about the llvm-commits mailing list