Disable Jump Threading for the targets with divergent control flow
authoralex-t <alexander.timofeev@amd.com>
Tue, 15 Dec 2020 16:05:56 +0000 (19:05 +0300)
committeralex-t <alexander.timofeev@amd.com>
Wed, 16 Dec 2020 23:40:54 +0000 (02:40 +0300)
commit35ec3ff76dee376661dd7e4971b80533a7a7f364
tree8618d018b52cec33122953fe423d264fe842437d
parent1844ab770cb9380a1896d83b1863b93766ffdf22
Disable Jump Threading for the targets with divergent control flow

Details: Jump Threading does not make sense for the targets with divergent CF
         since they do not use branch prediction for speculative execution.
         Also in the high level IR there is no enough information to conclude that the branch is divergent or uniform.
         This may cause errors in further CF lowering.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D93302
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/test/Transforms/JumpThreading/divergent-target-test.ll [new file with mode: 0644]