[clang] [llvm] [AArch64][SelectionDAG] Add CodeGen support for scalar FEAT_CPA (PR #105669)
Rodolfo Wottrich via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 6 05:04:53 PST 2025
================
@@ -10382,6 +10382,26 @@ let Predicates = [HasCPA] in {
// Scalar multiply-add/subtract
def MADDPT : MulAccumCPA<0, "maddpt">;
def MSUBPT : MulAccumCPA<1, "msubpt">;
+
+ // Rules to use CPA instructions in pointer arithmetic patterns which are not
+ // folded into loads/stores. The AddedComplexity serves to help supersede
+ // other simpler (non-CPA) patterns and make sure CPA is used instead.
+ let AddedComplexity = 20 in {
----------------
rgwott wrote:
That is a remainder from the previous PR, in which SelectionDAG did not differentiate between ptr and integer arithmetic (which was wrong), and this made instr selection "correct". I removed it now, well spotted.
https://github.com/llvm/llvm-project/pull/105669
More information about the cfe-commits
mailing list