[llvm] [AA] Refine ModRefInfo taking into account `errnomem` location (PR #157495)

Madhur Amilkanthwar via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 17 00:51:32 PDT 2025


madhur13490 wrote:

This change has caused massive failure in our CI. Many test-suites are failing with the below assert:

```
LLVM ERROR: Cannot implicitly convert a scalable size to a fixed-width size in `TypeSize::operator ScalarTy()`
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.

```

```
#3 0x00004000000608dc (linux-vdso.so.1+0x8dc)                                                                                                                                                                                                     
   6   │  #4 0x00004000004af200 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76                                                                                                                                                                   
   7   │  #5 0x000040000046a67c gsignal ./signal/../sysdeps/posix/raise.c:27:6                                                                                                                                                                              
   8   │  #6 0x0000400000457130 abort ./stdlib/abort.c:81:7                                                                                                                                                                                                 
   9   │  #7 0x00000000008b135c (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x8b135c)                                                                                                                                                            
  10   │  #8 0x00000000008b13f0 llvm::reportFatalInternalError(llvm::StringRef) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x8b13f0)                                                                                                            
  11   │  #9 0x0000000002939348 (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x2939348)                                                                                                                                                           
  12   │ #10 0x000000000291cadc llvm::AAResults::aliasErrno(llvm::MemoryLocation const&, llvm::Module const*) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x291cadc)                                                                             
  13   │ #11 0x00000000029384f0 llvm::BasicAAResult::getModRefInfo(llvm::CallBase const*, llvm::MemoryLocation const&, llvm::AAQueryInfo&) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x29384f0)                                                
  14   │ #12 0x000000000291e6ec llvm::AAResults::getModRefInfo(llvm::Instruction const*, std::optional const&, llvm::AAQueryInfo&) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x291e6ec)                                  
  15   │ #13 0x0000000002b054d4 llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(llvm::MemoryLocation const&, bool, llvm::ilist_iterator_w_bit                                                                                    
                   │ , false, false>, llvm::BasicBlock*, llvm::Instruction*, unsigned int*, llvm::BatchAAResults&) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x2b054d4)                                                                                    
  16   │ #14 0x0000000002b0a43c llvm::MemoryDependenceResults::getPointerDependencyFrom(llvm::MemoryLocation const&, bool, llvm::ilist_iterator_w_bits, fals
       │ e, false>, llvm::BasicBlock*, llvm::Instruction*, unsigned int*, llvm::BatchAAResults&) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x2b0a43c)                                                                                          
  17   │ #15 0x0000000002b0a600 llvm::MemoryDependenceResults::getNonLocalInfoForBlock(llvm::Instruction*, llvm::MemoryLocation const&, bool, llvm::BasicBlock*, std::vector>*, unsigned int,
       │  llvm::BatchAAResults&) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x2b0a600)                                                                                                                                                          
  18   │ #16 0x0000000002b0bbb0 llvm::MemoryDependenceResults::getNonLocalPointerDepFromBB(llvm::Instruction*, llvm::PHITransAddr const&, llvm::MemoryLocation const&, bool, llvm::BasicBlock*, llvm::SmallVectorImpl&, llvm::Small
       │ DenseMap, llvm::detail::DenseMapPair>&, bool, bool) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x2b0bbb0)           
  19   │ #17 0x0000000002b0d7bc llvm::MemoryDependenceResults::getNonLocalPointerDependency(llvm::Instruction*, llvm::SmallVectorImpl&) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x2b0d7bc)                          
  20   │ #18 0x000000000234ae28 llvm::GVNPass::processNonLocalLoad(llvm::LoadInst*) (.part.0) GVN.cpp:0:0                                                                                                                                                   
  21   │ #19 0x000000000234d3d4 llvm::GVNPass::processInstruction(llvm::Instruction*) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x234d3d4)                                                                                                     
  22   │ #20 0x000000000234dcac llvm::GVNPass::processBlock(llvm::BasicBlock*) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x234dcac)                                                                                                            
  23   │ #21 0x000000000234e1cc llvm::GVNPass::runImpl(llvm::Function&, llvm::AssumptionCache&, llvm::DominatorTree&, llvm::TargetLibraryInfo const&, llvm::AAResults&, llvm::MemoryDependenceResults*, llvm::LoopInfo&, llvm::OptimizationRemarkEmitter*, l
       │ lvm::MemorySSA*) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x234e1cc)                                                                                                                                                                 
  24   │ #22 0x000000000234ed1c llvm::GVNPass::run(llvm::Function&, llvm::AnalysisManager&) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x234ed1c)                                                                               
  25   │ #23 0x00000000011b5168 llvm::detail::PassModel>::run(llvm::Function&, llvm::AnalysisManager&) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x11b5168
       │ )                                                                                                                                                                                                                                                  
  26   │ #24 0x000000000327a6d8 llvm::PassManager>::run(llvm::Function&, llvm::AnalysisManager&) (/work/llvm/LA/main/20250916104529-0648c518/bin/ld.lld+0x327a6d8)                                                                                                                                                                                           
```

To reproduce, please run LLVM test-suite from the standard make commands.

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


More information about the llvm-commits mailing list