[llvm] [SCEV] Reject comparision of pointers to different address spaces in SCEVWrapPredicate::implies (PR #137935)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 30 01:57:44 PDT 2025


================
@@ -14967,6 +14967,12 @@ bool SCEVWrapPredicate::implies(const SCEVPredicate *N,
   if (Start->getType()->isPointerTy() != OpStart->getType()->isPointerTy())
     return false;
 
+  if (Start->getType()->isPointerTy()) {
+    if (Start->getType()->getPointerAddressSpace() !=
+        OpStart->getType()->getPointerAddressSpace())
----------------
nikic wrote:

```suggestion
    if (Start->getType() != OpStart->getType())
```

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


More information about the llvm-commits mailing list