[PATCH] D45664: [InstCombine] Canonicalize variable mask in masked merge
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 28 07:50:17 PDT 2018
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM - see inline for some nits.
================
Comment at: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2414-2420
+/// If we have a masked merge, in the form of:
+/// | A | |B|
+/// ((x ^ y) & M) ^ y
+/// | D |
+/// If A has one use, and M is inverted, we can convert it into:
+/// | D |
+/// ((x ^ y) & ~M) ^ x
----------------
The comment seems inverted from our usual description of:
Starting pattern --> Ending pattern
================
Comment at: lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2432
+
+ Value *iM;
+ if (match(M, m_Not(m_Value(iM)))) {
----------------
Call this 'NotM' to comply with LLVM capitalization rules?
Repository:
rL LLVM
https://reviews.llvm.org/D45664
More information about the llvm-commits
mailing list