[PATCH] D93065: [InstCombine] Disable optimizations of select instructions that causes propagation of poison values
    Nikita Popov via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jan 27 10:21:10 PST 2021
    
    
  
nikic added a comment.
@aqjune Is https://bugs.llvm.org/show_bug.cgi?id=48353 the only known (real-life) issue, or are there others? I'm okay with making shift optimization temporarily more conservative again. Not sure to what degree this addresses the issue though, even as as workaround. Shouldn't it also be easy to trigger something based on `add nsw` arithmetic in C? Or is there a reason why that is less likely?
A thought I had is to do something like https://gist.github.com/nikic/e855476bcd87124ff8550ad9b5432f26, basically assume that clang has annotated everything possible as noundef, which should give us a pretty good heuristic to distinguish "poison might practically occur here" and "poison can theoretically occur here". The main casualty of that approach is the "one hot merge" optimization, which just doesn't seem valid to do with selects.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93065/new/
https://reviews.llvm.org/D93065
    
    
More information about the llvm-commits
mailing list