forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] Peephole optimization to remove redundant csel instructions (…
…llvm#101483) Given a sequence such as %8:gpr64 = COPY $xzr %10:gpr64 = COPY $xzr %11:gpr64 = CSELXr %8:gpr64, %10:gpr64, 0, implicit $nzcv `PeepholeOptimizer::foldRedundantCopy` led to the creation of select instructions where both inputs were the same register: %11:gpr64 = CSELXr %8:gpr64, %8:gpr64, 0, implicit $nzcv This change adds a later peephole optimization that replaces such selects with unconditional moves.
- Loading branch information
1 parent
69fe7da
commit 29763aa
Showing
3 changed files
with
31 additions
and
3 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