[llvm] 3c9236c - [LoopVersioningLICM] add comment regarding dubious check (NFC)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 03:20:15 PST 2023


Author: Bruno De Fraine
Date: 2023-12-13T12:20:08+01:00
New Revision: 3c9236c0bf57a3a7689fc64c57c1325ea466b1c0

URL: https://github.com/llvm/llvm-project/commit/3c9236c0bf57a3a7689fc64c57c1325ea466b1c0
DIFF: https://github.com/llvm/llvm-project/commit/3c9236c0bf57a3a7689fc64c57c1325ea466b1c0.diff

LOG: [LoopVersioningLICM] add comment regarding dubious check (NFC)

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
index 13e06c79d0d7eb..9d5e6693c0e53a 100644
--- a/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp
@@ -266,6 +266,11 @@ bool LoopVersioningLICM::legalLoopMemoryAccesses() {
     for (const auto &A : AS) {
       Value *Ptr = A.getValue();
       // Alias tracker should have pointers of same data type.
+      //
+      // FIXME: check no longer effective since opaque pointers?
+      // If the intent is to check that the memory accesses use the
+      // same data type (such that LICM can promote them), then we
+      // can no longer see this from the pointer value types.
       TypeCheck = (TypeCheck && (SomePtr->getType() == Ptr->getType()));
     }
     // At least one alias tracker should have pointers of same data type.


        


More information about the llvm-commits mailing list