[all-commits] [llvm/llvm-project] 5dc339: [AArch64][GlobalISel] Fold 64-bit cmps with 64-bit...
Jessica Paquette via All-commits
all-commits at lists.llvm.org
Thu Oct 21 13:55:56 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5dc339d9825f1dbe788cfb69c88210a59bbf8e3a
https://github.com/llvm/llvm-project/commit/5dc339d9825f1dbe788cfb69c88210a59bbf8e3a
Author: Jessica Paquette <jpaquette at apple.com>
Date: 2021-10-21 (Thu, 21 Oct 2021)
Changed paths:
M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
M llvm/test/CodeGen/AArch64/GlobalISel/select-cmp.mir
Log Message:
-----------
[AArch64][GlobalISel] Fold 64-bit cmps with 64-bit adds
G_ICMP is selected to an arithmetic overflow op (ADDS/SUBS/etc) with a dead
destination + a CSINC instruction.
We have a fold which allows us to combine 32-bit adds with G_ICMP.
The problem with G_ICMP is that we model it as always having a 32-bit
destination even though it can be a 64-bit operation. So, we were missing some
opportunities for 64-bit folds.
This patch teaches the fold to recognize 64-bit G_ICMPs + refactors some of
the code surrounding CSINC accordingly.
(Later down the line, I think we should probably change the way we handle G_ICMP
in general.)
Differential Revision: https://reviews.llvm.org/D111088
More information about the All-commits
mailing list