aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/Utils.cpp
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-03-14 16:47:41 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-03-29 23:08:47 +0200
commit7669455df49e6fc8ae7d9f4bd4ee95bb20e7eb6e (patch)
treec7d2cb24e671a92d623da299827d340a49af7240 /llvm/lib/Transforms/Utils/Utils.cpp
parentbd8dd580ffd221dd38e28c609b30d9b6361efac7 (diff)
downloadllvm-7669455df49e6fc8ae7d9f4bd4ee95bb20e7eb6e.zip
llvm-7669455df49e6fc8ae7d9f4bd4ee95bb20e7eb6e.tar.gz
llvm-7669455df49e6fc8ae7d9f4bd4ee95bb20e7eb6e.tar.bz2
[X86][FastISel] Fix with.overflow eflags clobber (PR49587)
If the successor block has a phi node, then additional moves may be inserted into predecessors, which may clobber eflags. Don't try to fold the with.overflow result into the branch in that case. This is done by explicitly checking for any phis in successor blocks, not sure if there's some more principled way to address this. Other fused compare and branch patterns avoid the issue by emitting the comparison when handling the branch, so that no instructions may be inserted in between. In this case, the with.overflow call is emitted separately (and I don't think this is avoidable, as it will generally have at least two users). Fixes https://bugs.llvm.org/show_bug.cgi?id=49587. Differential Revision: https://reviews.llvm.org/D98600
Diffstat (limited to 'llvm/lib/Transforms/Utils/Utils.cpp')
0 files changed, 0 insertions, 0 deletions