[PATCH] D57401: [DAGCombiner] fold add/sub with bool operand based on target's boolean contents
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 30 06:31:26 PST 2019
spatel marked an inline comment as done.
spatel added inline comments.
================
Comment at: test/CodeGen/PowerPC/select_const.ll:268-269
}
+; FIXME: This could be addi 3, 3, 42
+
----------------
efriedma wrote:
> This looks like a missing target-independent pattern; we're ending up with something like "42 - (cond & 1)" instead of "42 + cond".
Yes, we're missing a generic combine here, but I thought we had the 1 you mentioned. Ie, if I saw it correctly while glancing at it the first time, this requires an AssertSext to uncover.
I'll have a closer look to avoid this, but I figured the other diffs were more realistic, so we might want to commit this patch first if it looks reasonable.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57401/new/
https://reviews.llvm.org/D57401
More information about the llvm-commits
mailing list