[InstCombine] Do not combine atomic and non-atomic loads
Before this change, InstCombine was willing to fold atomic and non-atomic loads through a PHI node as long as the first PHI argument is not an atomic load. The combined load would be non-atomic, which is incorrect. Fix this by only combining the loads in a PHI node when all of the arguments are non-atomic loads. Thanks to Eli Friedman for pointing out the bug at https://github.com/llvm/llvm-project/issues/50777#issuecomment-981045342! Fixes #50777 Differential Revision: https://reviews.llvm.org/D115113
Loading
Please register or sign in to comment