[PATCH] D39421: [InstCombine] Extracting common and-mask for shift operands of Or instruction

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 06:08:10 PST 2017


spatel added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2288
+      if (ShiftBy0 == ShiftBy1 && ShiftOpcode0 == ShiftOpcode1) {
+        // ((V<<C3)&C1) | ((V<<C3)&C2) --> (V<<C3)&(C1|C2)
+        unsigned SavedInstructions = Op0->hasOneUse() + Op1->hasOneUse() +
----------------
Why are we looking for a pattern that early-cse can simplify? I think this is beyond the scope of instcombine.


https://reviews.llvm.org/D39421





More information about the llvm-commits mailing list