[all-commits] [llvm/llvm-project] a2bb73: [InstCombine] Do not combine atomic and non-atomic...
Ricky Zhou via All-commits
all-commits at lists.llvm.org
Sun Jan 30 06:59:47 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a2bb7313e62daa8aaa9b06fe57386ed7221a990a
https://github.com/llvm/llvm-project/commit/a2bb7313e62daa8aaa9b06fe57386ed7221a990a
Author: Ricky Zhou <ricky+llvm at rzhou.org>
Date: 2022-01-30 (Sun, 30 Jan 2022)
Changed paths:
M llvm/test/Transforms/InstCombine/phi.ll
Log Message:
-----------
[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
More information about the All-commits
mailing list