[PATCH] D45664: [InstCombine] Canonicalize variable mask in masked merge

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 28 08:49:34 PDT 2018


lebedev.ri marked 3 inline comments as done.
lebedev.ri added a comment.

@spatel thank you for the review!



================
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
----------------
spatel wrote:
> The comment seems inverted from our usual description of:
> Starting pattern --> Ending pattern
It is because this very function will be dealing with unfolding the pattern in case of constant mask (D45867), then the description will be appended.
But i tried to reword it a little.


Repository:
  rL LLVM

https://reviews.llvm.org/D45664





More information about the llvm-commits mailing list