[PATCH] D86709: [GlobalISel] Extend not_cmp_fold to work on conditional expressions

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 2 03:29:24 PDT 2020


foad marked an inline comment as done.
foad added a comment.

In D86709#2242546 <https://reviews.llvm.org/D86709#2242546>, @arsenm wrote:

> In D86709#2242520 <https://reviews.llvm.org/D86709#2242520>, @aemerson wrote:
>
>> Why isn't this caught in InstCombine?
>
> This is going to show up as branch conditions are swapped for control flow lowering

Right, the xor is introduced by `IRTranslator::emitSwitchCase`. Perhaps it could be optimized at that point, instead of later in a combiner pass, but I'm not sure how feasible that is. I guess at that point you can't do accurate `hasOneNonDBGUse` checks?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86709



More information about the llvm-commits mailing list