[llvm] [Attributor] Skip AS specialization for volatile memory instructions (PR #107250)

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 08:58:22 PDT 2024


================
@@ -12552,25 +12580,15 @@ struct AAAddressSpaceImpl : public AAAddressSpace {
             getAssociatedType()->getPointerAddressSpace())
       return ChangeStatus::UNCHANGED;
 
-    Type *NewPtrTy = PointerType::get(getAssociatedType()->getContext(),
-                                      static_cast<uint32_t>(getAddressSpace()));
+    PointerType *NewPtrTy =
+        PointerType::get(getAssociatedType()->getContext(),
+                         static_cast<uint32_t>(getAddressSpace()));
     bool UseOriginalValue =
         OriginalValue->getType()->getPointerAddressSpace() ==
         static_cast<uint32_t>(getAddressSpace());
----------------
jdoerfert wrote:

Why do we "change" anything if the AS is the same as before? We should have given up earlier.

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


More information about the llvm-commits mailing list