Prevent LICM and machineLICM from hoisting convergent operations
authorQuentin Colombet <qcolombet@apple.com>
Fri, 6 Nov 2020 18:25:16 +0000 (10:25 -0800)
committerQuentin Colombet <qcolombet@apple.com>
Fri, 6 Nov 2020 18:26:39 +0000 (10:26 -0800)
commita585228027a0f025011d77916234cfba12e44309
treebc75183c9336ee223cb6360d06227bf3088362c1
parent137ff7331705179c83533a074d800c481b7df1ac
Prevent LICM and machineLICM from hoisting convergent operations

Results of convergent operations are implicitly affected by the
enclosing control flows and should not be hoisted out of arbitrary
loops.

Patch by Xiaoqing Wu <xiaoqing_wu@apple.com>

Differential Revision: https://reviews.llvm.org/D90361
llvm/lib/CodeGen/MachineLICM.cpp
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/CodeGen/AMDGPU/machinelicm-convergent.mir [new file with mode: 0644]
llvm/test/Transforms/LICM/convergent.ll [new file with mode: 0644]