[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


================
@@ -16595,6 +16595,21 @@ bool AArch64TargetLowering::isLegalAddImmediate(int64_t Immed) const {
   return IsLegal;
 }
 
+bool AArch64TargetLowering::isLegalAddScalableImmediate(int64_t Imm) const {
+  // Scalable immediates require SVE support.
+  if (!Subtarget->hasSVE())
----------------
davemgreen wrote:

Should all of this require sve2? Otherwise we don't generate the instructions.

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


More information about the llvm-commits mailing list