[PATCH] D97665: [InstSimplify] Don't fold comparisons of non-inbounds GEPs
    Nuno Lopes via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jun 22 01:55:48 PDT 2021
    
    
  
nlopes requested changes to this revision.
nlopes added a comment.
This revision now requires changes to proceed.
Since we settled on pointer comparison being equivalent to address comparison (i.e., provenance is not taken into account), then the current code is correct.
See table 2 here, for example: https://web.ist.utl.pt/nuno.lopes/pubs/alive2-mem-cav21.pdf#page=10
Therefore I suggest we drop this patch.
The optimization that is wrong under this model is one in InstSimplify that folds pointer comparison between pointers of different objects to false. That is not correct for geps that aren't inbounds.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97665/new/
https://reviews.llvm.org/D97665
    
    
More information about the llvm-commits
mailing list