1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/test
Reid Kleckner f0451463da Fix conditional tail call branch folding when both edges are the same
The conditional tail call logic did the wrong thing when both
destinations of a conditional branch were the same:

BB#1: derived from LLVM BB %entry
    Live Ins: %EFLAGS
    Predecessors according to CFG: BB#0
        JE_1 <BB#5>, %EFLAGS<imp-use,kill>
        JMP_1 <BB#5>

BB#5: derived from LLVM BB %sw.epilog
    Predecessors according to CFG: BB#1
        TCRETURNdi64 <ga:@mergeable_conditional_tailcall>, 0, ...

We would fold the JE_1 to a TCRETURNdi64cc, and then remove our BB#5
successor. Then BB#5 would be deleted as it had no predecessors, leaving
a dangling "JMP_1 <BB#5>" reference behind to cause assertions later.

This patch checks that both conditional branch destinations are
different before doing the transform. The standard branch folding logic
is able to remove both the JMP_1 and the JE_1, and for my test case we
end up forming a better conditional tail call later.

Fixes PR33980

llvm-svn: 309422
2017-07-28 19:48:40 +00:00
..
Analysis Revert "[SCEV] Cache results of computeExitLimit" 2017-07-28 03:25:07 +00:00
Assembler test: require x86 backend 2017-07-28 04:15:35 +00:00
Bindings
Bitcode Debug Info: Add a file: field to DIImportedEntity. 2017-07-19 00:09:54 +00:00
BugPoint
CodeGen Fix conditional tail call branch folding when both edges are the same 2017-07-28 19:48:40 +00:00
DebugInfo DebugInfo: Consider a CU containing only local imported entities to be 'empty' 2017-07-28 03:06:25 +00:00
DllTool llvm: add llvm-dlltool support to the archiver 2017-07-18 21:26:38 +00:00
Examples
ExecutionEngine
Feature
FileCheck [llvm] Remove redundant check-prefix=CHECK from tests. NFC. 2017-07-17 17:32:45 +00:00
Instrumentation [sanitizer-coverage] rename sanitizer-coverage-create-pc-table into sanitizer-coverage-pc-table and add plumbing for a clang flag 2017-07-28 00:09:29 +00:00
Integer
JitListener
LibDriver
Linker ThinLTO: Don't import aliases of any kind (even linkonce_odr) 2017-07-27 15:09:06 +00:00
LTO LTO: Export functions referenced by the CFI jump table. 2017-07-19 18:18:19 +00:00
MC [COFF, ARM64] Fix symbol offsets in ADRP/ADD/LDR/STR relocations 2017-07-26 11:19:17 +00:00
Object [LTO] Prevent dead stripping and internalization of symbols with sections 2017-07-25 19:42:32 +00:00
ObjectYAML [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId 2017-07-17 23:59:44 +00:00
Other Relax the matching in these tests 2017-07-27 17:45:02 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen Re-commit: r309094 [globalisel][tablegen] Fuse the generated tables together. 2017-07-27 11:03:45 +00:00
ThinLTO/X86 ThinLTO: Don't import aliases of any kind (even linkonce_odr) 2017-07-27 15:09:06 +00:00
tools Add test to reject merging of empty manifest. 2017-07-27 19:58:12 +00:00
Transforms [LVI] Constant-propagate a zero extension of the switch condition value through case edges 2017-07-28 18:35:25 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt Revert "Reland "[LLVM][llvm-objcopy] Added basic plumbing to get things started"" 2017-07-27 06:02:05 +00:00
lit.cfg Re-enable libxml2 tests. 2017-07-27 01:11:53 +00:00
lit.site.cfg.in Correctly enable the llvm-mt tests, now that build flags changed. 2017-07-26 16:35:44 +00:00
TestRunner.sh