[PATCH] D93853: [CodeGen] recognize select form of and/ors when splitting branch conditions

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 31 03:48:44 PST 2020


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

In D93853#2473140 <https://reviews.llvm.org/D93853#2473140>, @aqjune wrote:

> I'm slightly worried that it will still preserve unsound IR-level transformation (because CodeGenPrepare is in IR). :( A bug in CodeGenPrepare will be hard to discover because opt -O<n> won't use it.
> If DAGCombiner does that, would it be still okay in terms of performance? I see that SelectionDAGISel::CodeGenAndEmitDAG invokes CurDAG->Combine first.

Fair enough. CGP does call things like InstructionSimplify, so there is some potential for issues... I was concerned that keeping select would cause SDAG fallback in FastISel, but apparently that will happen anyway for non-branch uses of and/or (and branch uses are split).

So this LGTM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93853



More information about the llvm-commits mailing list