[llvm] [AArch64] Fix build failure with -Werror (PR #144749)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 18 09:38:30 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-aarch64

Author: John Brawn (john-brawn-arm)

<details>
<summary>Changes</summary>

PR#<!-- -->144387 caused buildbot failures with -Werror due to a comparison between signed and unsigned types. Fix this with an explicit cast.

---
Full diff: https://github.com/llvm/llvm-project/pull/144749.diff


1 Files Affected:

- (modified) llvm/lib/Target/AArch64/AArch64ISelLowering.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 22c497d3de647..76d88aa7918bb 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -27057,7 +27057,7 @@ bool AArch64TargetLowering::getIndexedAddressParts(SDNode *N, SDNode *Op,
     // only allow an offset that's equal to the store size.
     EVT MemType = cast<MemSDNode>(N)->getMemoryVT();
     if (!Subtarget->isLittleEndian() && MemType.isVector() &&
-        RHSC != MemType.getStoreSize())
+        (uint64_t)RHSC != MemType.getStoreSize())
       return false;
     // Always emit pre-inc/post-inc addressing mode. Use negated constant offset
     // when dealing with subtraction.

``````````

</details>


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


More information about the llvm-commits mailing list