[GVN] Do not combine convergent calls in GVN/NewGVN
authorJay Foad <jay.foad@amd.com>
Fri, 19 May 2023 15:33:19 +0000 (16:33 +0100)
committerJay Foad <jay.foad@amd.com>
Fri, 19 May 2023 20:27:35 +0000 (21:27 +0100)
commitc86a1e6903e9935b808c1406f480c769279b69fa
tree7368248294157d774f915862cb14d32f7b23fa94
parent890c76a9314a0b2fca7341b9307955ed83dccfc0
[GVN] Do not combine convergent calls in GVN/NewGVN

Note that this is very conservative since it will not even combine
convergent calls that appear in the same basic block, but EarlyCSE will
handle that case.

Differential Revision: https://reviews.llvm.org/D150974
llvm/lib/Transforms/Scalar/GVN.cpp
llvm/lib/Transforms/Scalar/NewGVN.cpp
llvm/test/Transforms/GVN/convergent.ll
llvm/test/Transforms/NewGVN/convergent.ll