aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorBrian M. Rzycki <brzycki@gmail.com>2019-04-08 18:20:35 +0000
committerBrian M. Rzycki <brzycki@gmail.com>2019-04-08 18:20:35 +0000
commit887865c1ad6e2a50251846a1ab907ec000271c17 (patch)
treedc75fc09ac4b343cd3efd832e60881cf6c74981a /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parentebf1830bb1ddb7a49f3e037bca83b3ec4f60a05c (diff)
downloadllvm-887865c1ad6e2a50251846a1ab907ec000271c17.zip
llvm-887865c1ad6e2a50251846a1ab907ec000271c17.tar.gz
llvm-887865c1ad6e2a50251846a1ab907ec000271c17.tar.bz2
[JumpThreading] Fix incorrect fold conditional after indirectbr/callbr
Fixes bug 40992: https://bugs.llvm.org/show_bug.cgi?id=40992 There is potential for miscompiled code emitted from JumpThreading when analyzing a block with one or more indirectbr or callbr predecessors. The ProcessThreadableEdges() function incorrectly folds conditional branches into an unconditional branch. This patch prevents incorrect branch folding without fully pessimizing other potential threading opportunities through the same basic block. This IR shape was manually fed in via opt and is unclear if clang and the full pass pipeline will ever emit similar code shapes. Thanks to Matthias Liedtke for the bug report and simplified IR example. Differential Revision: https://reviews.llvm.org/D60284 llvm-svn: 357930
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions