================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to