[PATCH] D124506: [NFC][AArch64][CodeGen] Use ArrayRef in TargetLowering functions

Shao-Ce SUN via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 03:17:06 PDT 2022


sunshaoce added a comment.

IMO, at least some of these modifications can be employed.



================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:435-436
+  setOperationAction(
+      {ISD::SADDO, ISD::UADDO, ISD::SSUBO, ISD::USUBO, ISD::SMULO, ISD::UMULO},
+      {MVT::i32, MVT::i64}, Custom);
+
----------------
The main purpose of this implementation is to reduce code duplication.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:763-768
+    setOperationAction({ISD::FP_TO_SINT, ISD::FP_TO_UINT, ISD::SINT_TO_FP,
+                        ISD::UINT_TO_FP, ISD::FP_ROUND, ISD::FP_TO_SINT_SAT,
+                        ISD::FP_TO_UINT_SAT, ISD::MUL, ISD::STRICT_FP_TO_SINT,
+                        ISD::STRICT_FP_TO_UINT, ISD::STRICT_SINT_TO_FP,
+                        ISD::STRICT_UINT_TO_FP, ISD::STRICT_FP_ROUND},
+                       MVT::v1i64, Expand);
----------------
Also, I've noticed that similar measures have been taken in many places.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124506/new/

https://reviews.llvm.org/D124506



More information about the llvm-commits mailing list