llvm-6502/test
Chandler Carruth 3b7b209bf8 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
2011-11-22 13:13:16 +00:00
..
Analysis Don't forget to check FlagNW when determining whether an AddRecExpr will wrap 2011-11-09 07:11:37 +00:00
Archive
Assembler
Bindings/Ocaml
Bitcode
BugPoint
CodeGen Fix a devilish miscompile exposed by block placement. The 2011-11-22 13:13:16 +00:00
DebugInfo The dwarf standard says that the only differences between a out-of-line 2011-11-12 01:57:54 +00:00
ExecutionEngine
Feature
Instrumentation/AddressSanitizer [asan] workaround for reg alloc bug 11395: don't instrument functions with large chunks of inline assembler 2011-11-18 01:41:06 +00:00
Integer
lib
Linker
MC Remove obsolete test. 2011-11-16 22:50:38 +00:00
Object
Other
Scripts
TableGen
Transforms Fix crasher in GVN due to my recent capture tracking changes. 2011-11-21 19:42:56 +00:00
Unit
Verifier
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile build/make/test: Get rid of unused BUGPOINT_TOPTS variable. 2011-11-16 23:56:03 +00:00
Makefile.tests
site.exp.in
TestRunner.sh