[PATCH] D141660: [InstCombine] Fold pattern xor(and, or) to select
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 18 05:30:13 PST 2023
spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/test/Transforms/InstCombine/xor-and-or.ll:200
-;; TODO: do we really need to do this transform?
+;; even through we save a instruction here, select is heavier than normal
+;; and/or/xor on most backend, do we really need to do this transform?
----------------
typo: through -> though
If there's evidence that this is worse in codegen, then we could restrict the transform in this patch - only change when one or more of the original instructions is a select?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141660/new/
https://reviews.llvm.org/D141660
More information about the llvm-commits
mailing list