[PATCH] D109194: [InstCombine] Canonicalize masked merge; optimize (a & b) | (~a & c)

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 15 18:23:49 PDT 2021


MatzeB added a comment.

> I don't think this makes sense as an InstCombine (middle end) transform. The resulting expression is less analyzable both in that freeze is a complete analysis blocker, and xor is generally less analyzable than and/or. This looks like something we should be doing in the backend instead.

Sure I can easily move this change to SelectionDAG. Though we gotta ask the question then if we shouldn't canonicalize the xor variant towards and/or in InstCombine then... At least I thought that is the normal reaction that when you have 2 expression that are equivalent that you canonicalize in InstCombine...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109194/new/

https://reviews.llvm.org/D109194



More information about the llvm-commits mailing list