-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RISCV] Introduce RISCVISD::CZERO_{EQZ,NEZ} nodes produce them when z…
…icond is present in lowerSELECT This patch is a step towards altering how we handle the emission of condops. Marking ISD::SELECT as legal is a major change in the codegen path, and gives few options for maintaining the old codegen path when it is believed to be better (e.g. a better branchless sequence is possible using non-zicond instructions, or the branch-based sequence is preferable). This removes the existing SelectionDAG patterns and moves the logic into lowerSELECT. Along some small codegen changes you'll note a few minor regressions in the generated code quality - this are due to the fact that by lowering the SELECT node early we miss out on combines that would kick in later when setcc condcodes that aren't natively supported have been expanded (thus exposing opportunities for optimisation by performing logical negation and swapping truev/falsev). I've opted to split out work that addresses these into follow-on patches (especially as zicond is still 'experimental'). matchSetCC is a straight-forward translation from the version in RISCVISelDAGToDAG. Ideally, in the future it can be converted to a helper shared between both files. Differential Revision: https://reviews.llvm.org/D155083
- Loading branch information
Showing
5 changed files
with
209 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.