[PATCH] Added instruction combine to transform few more negative values addition to subtraction

Benjamin Kramer benny.kra at gmail.com
Wed May 14 08:49:40 PDT 2014

Comment at: lib/Transforms/InstCombine/InstCombineAddSub.cpp:929
@@ +928,3 @@
+      C1->getValue() == ~C2->getValue()) {
+    return Builder->CreateAnd(Z, C1);
+  }
Can you return the fully transformed value? I find it confusing to have this split in half. You can create both instructions with IRBuilder and use ReplaceInstUsesWith at the call site.


More information about the llvm-commits mailing list