[llvm] [globals-aa] Improved isNonEscapingGlobalNoAlias. (PR #127707)
    Eli Friedman via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Feb 18 16:56:54 PST 2025
    
    
  
================
@@ -762,6 +763,18 @@ bool GlobalsAAResult::isNonEscapingGlobalNoAlias(const GlobalValue *GV,
       continue;
     }
 
+    // A non-addr-taken global cannot alias with any non-pointer value.
+    if (!Input->getType()->isPointerTy())
----------------
efriedma-quic wrote:
I have no idea why we don't forbid alias queries on non-pointers.  CC @nikic.
In any case, you can hoist this check out of the loop.
https://github.com/llvm/llvm-project/pull/127707
    
    
More information about the llvm-commits
mailing list