Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 #50777 (comment)! Fixes #50777 Differential Revision: https://reviews.llvm.org/D115113
- Loading branch information