1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/test
Max Kazantsev 8b58bcf73c [LV] Do not create SCEVs on broken IR in emitTransformedIndex. PR39160
At the point when we perform `emitTransformedIndex`, we have a broken IR (in
particular, we have Phis for which not every incoming value is properly set). On
such IR, it is illegal to create SCEV expressions, because their internal
simplification process may try to prove some predicates and break when it
stumbles across some broken IR.

The only purpose of using SCEV in this particular place is attempt to simplify
the generated code slightly. It seems that the result isn't worth it, because
some trivial cases (like addition of zero and multiplication by 1) can be
handled separately if needed, but more generally InstCombine is able to achieve
the goals we want to achieve by using SCEV.

This patch fixes a functional crash described in PR39160, and as side-effect it
also generates a bit smarter code in some simple cases. It also may cause some
optimality loss (i.e. we will now generate `mul` by power of `2` instead of
shift etc), but there is nothing what InstCombine could not handle later. In
case of dire need, we can support more trivial cases just in place.

Note that this patch only fixes one particular case of the general problem that
LV misuses SCEV, attempting to create SCEVs or prove predicates on invalid IR.
The general solution, however, seems complex enough.

Differential Revision: https://reviews.llvm.org/D52881
Reviewed By: fhahn, hsaito

llvm-svn: 343954
2018-10-08 05:46:29 +00:00
..
Analysis [LV][LAA] Vectorize loop invariant values stored into loop invariant address 2018-09-25 20:57:20 +00:00
Assembler Emit template type and value parameter DIEs for template variables. 2018-10-03 18:44:53 +00:00
Bindings [LLVM-C] Add more debug information accessors to GlobalObject and Instruction 2018-09-28 15:35:18 +00:00
Bitcode Fix some missing opcodes in bcanalyzer 2018-09-24 12:47:17 +00:00
BugPoint
CodeGen [DAGCombiner] allow undef elts in vector fadd matching 2018-10-07 16:30:42 +00:00
DebugInfo [PDB] Add the ability to lookup global symbols by name. 2018-10-08 04:19:16 +00:00
Demangle
Examples
ExecutionEngine [ORC] Add partitioning support to CompileOnDemandLayer2. 2018-09-29 23:49:57 +00:00
Feature
FileCheck
Instrumentation [hwasan] Record and display stack history in stack-based reports. 2018-09-24 23:03:34 +00:00
Integer
JitListener
Linker Fix asserts when linking wrong address space declarations 2018-09-24 04:42:14 +00:00
LTO Pass code-model through Module IR to LTO which will use it. 2018-09-21 18:41:31 +00:00
MC [RISCV] Compress addiw rd, x0, simm6 to c.li rd, simm6 2018-10-06 06:09:46 +00:00
Object [llvm-ar] Use POSIX-specified timestamps for 'tv'. 2018-10-05 23:25:39 +00:00
ObjectYAML
Other [New PM][PassTiming] implement -time-passes for the new pass manager 2018-10-05 22:32:01 +00:00
SafepointIRVerifier
SymbolRewriter
TableGen [globalisel][tblgen] Table optimization should consider the C++ code in C++ predicates 2018-09-25 17:59:02 +00:00
ThinLTO/X86 [llvm-nm] Write "no symbol" output to stderr 2018-10-05 21:10:03 +00:00
tools [llvm-ar] Use POSIX-specified timestamps for 'tv'. 2018-10-05 23:25:39 +00:00
Transforms [LV] Do not create SCEVs on broken IR in emitTransformedIndex. PR39160 2018-10-08 05:46:29 +00:00
Unit
Verifier [machineverifier] Detect PHI's that are preceeded by non-PHI's 2018-10-03 22:05:31 +00:00
YAMLParser
.clang-format
CMakeLists.txt Reapply r343058 with a fix for -DLLVM_ENABLE_THREADS=OFF. 2018-09-26 16:26:59 +00:00
lit.cfg.py Reapply r343058 with a fix for -DLLVM_ENABLE_THREADS=OFF. 2018-09-26 16:26:59 +00:00
lit.site.cfg.py.in Reapply r343058 with a fix for -DLLVM_ENABLE_THREADS=OFF. 2018-09-26 16:26:59 +00:00
TestRunner.sh