aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/Utils/X86ShuffleDecode.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-11-22 13:13:16 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-11-22 13:13:16 +0000
commit3b7b209bf86d3e81d61cc195020bd4891467291b (patch)
tree7a2f3a96b8ef654ee5c838936f3013b7cb5b004f /lib/Target/X86/Utils/X86ShuffleDecode.cpp
parent5745fbce1674b29f4dce6b6e31556c4c1e83dc89 (diff)
Fix a devilish miscompile exposed by block placement. The
updateTerminator code didn't correctly handle EH terminators in one very specific case. AnalyzeBranch would find no terminator instruction, and so the fallback in updateTerminator is to assume fallthrough. This is correct, but the destination of the fallthrough was assumed to be the first successor. This is *almost always* true, but in certain cases the loop transformations will cause the landing pad to be the first successor! Instead of this brittle logic, actually look through the successors for a non-landing-pad accessor, and to assert if more than one is found. This will hopefully fix some (if not all) of the self host miscompiles with block placement. Thanks to Benjamin Kramer for reporting, Nick Lewycky for an initial stab at a reduction, and Duncan for endless advice on EH (which I know nothing about) as well as reviewing the actual fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/Utils/X86ShuffleDecode.cpp')
0 files changed, 0 insertions, 0 deletions