[llvm] [TTI][TLI] Support scalable immediates with isLegalAddImmediate (PR #84173)

David Green via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 01:34:11 PDT 2024


================
@@ -696,6 +696,12 @@ class TargetTransformInfo {
   /// immediate without having to materialize the immediate into a register.
   bool isLegalAddImmediate(int64_t Imm) const;
 
+  /// Return true if the specified immediate is legal add of a scalable
+  /// immediate, that is the target has add instructions which can add a
+  /// register with the immediate (multiplied by vscale) without having to
+  /// materialize the immediate into a register.
----------------
davemgreen wrote:

Maybe:
"Return true if the add of the specified scalable immediate is legal, that is..."

https://github.com/llvm/llvm-project/pull/84173


More information about the llvm-commits mailing list