[SimplifyCFG] Don't fold conditional branches that contain calls to convergent functions.
authorJustin Lebar <jlebar@google.com>
Fri, 12 Feb 2016 21:01:36 +0000 (21:01 +0000)
committerJustin Lebar <jlebar@google.com>
Fri, 12 Feb 2016 21:01:36 +0000 (21:01 +0000)
commitdb63949e8dd561e2430bf864b22081b4bc588160
treecec1ab85b1717a0e20248f82663b2dc22782e6ec
parentdf04d2a1f1b9621fc75a28a45c4193b03da59bf8
[SimplifyCFG] Don't fold conditional branches that contain calls to convergent functions.

Summary:
Performing this optimization duplicates the call to the convergent
function and adds new control-flow dependencies, which is a no-no.

Reviewers: jingyue

Subscribers: broune, hfinkel, tra, resistor, joker.eph, arsenm, llvm-commits, mzolotukhin

Differential Revision: http://reviews.llvm.org/D17128

llvm-svn: 260730
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/test/Transforms/SimplifyCFG/attr-convergent.ll [new file with mode: 0644]