[llvm] [LSR] Recognize vscale-relative immediates (PR #88124)

Graham Hunter via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 08:43:50 PDT 2024


================
@@ -2590,18 +2720,25 @@ bool LSRInstance::reconcileNewOffset(LSRUse &LU, int64_t NewOffset,
   }
 
   // Conservatively assume HasBaseReg is true for now.
-  if (NewOffset < LU.MinOffset) {
+  if (Immediate::isKnownLT(NewOffset, LU.MinOffset)) {
----------------
huntergr-arm wrote:

Maybe we need a comparison function which returns a std::optional around the result? So we can distinguish between 'no, it's not less than' and 'I cannot tell you if it's less than'.

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


More information about the llvm-commits mailing list