1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib
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 [IAI,LV] Avoid creating interleave-groups for predicated accesse 2018-10-07 06:57:25 +00:00
AsmParser Emit template type and value parameter DIEs for template variables. 2018-10-03 18:44:53 +00:00
BinaryFormat Revert r343317 2018-09-28 17:01:50 +00:00
Bitcode Emit template type and value parameter DIEs for template variables. 2018-10-03 18:44:53 +00:00
CodeGen Revert r343948 "[LegalizeDAG] Make one of the ReplaceNode signatures take an ArrayRef instead a pointer to an array. Add assert on size of array. NFC" 2018-10-08 03:12:12 +00:00
DebugInfo Fix a -Wsign-compare warning. 2018-10-08 04:44:12 +00:00
Demangle Update microsoftDemangle() to work more like itaniumDemangle(). 2018-09-15 18:24:20 +00:00
ExecutionEngine [ORC] Add a 'remove' method to JITDylib to remove symbols. 2018-10-06 23:03:59 +00:00
Fuzzer
FuzzMutate [New PM] Introducing PassInstrumentation framework 2018-09-20 17:08:45 +00:00
IR [New PM][PassTiming] implement -time-passes for the new pass manager 2018-10-05 22:32:01 +00:00
IRReader
LineEditor
Linker Fix asserts when linking wrong address space declarations 2018-09-24 04:42:14 +00:00
LTO llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
MC [WebAssembly] Fixed missing "global" symbol type in AsmParser. 2018-10-04 23:48:53 +00:00
Object Give same-named members unique timestamps on Darwin in llvm-ar. 2018-10-04 18:49:21 +00:00
ObjectYAML [WebAssembly] Add V128 value type to binary format 2018-09-20 22:04:44 +00:00
Option Revert r341329 due to MSAN error 2018-09-03 18:13:46 +00:00
Passes [New PM][PassTiming] implement -time-passes for the new pass manager 2018-10-05 22:32:01 +00:00
ProfileData llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
Support [AArch64] -mcpu=native CPU detection for Cavium processors 2018-10-05 22:23:21 +00:00
TableGen llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...) 2018-09-27 02:13:45 +00:00
Target [X86] getFauxShuffleMask - Handle undef + sentinel values in subvector insertion 2018-10-06 22:13:44 +00:00
Testing Fix error with SmallString implicit conversion. 2018-09-06 22:47:32 +00:00
ToolDrivers
Transforms [LV] Do not create SCEVs on broken IR in emitTransformedIndex. PR39160 2018-10-08 05:46:29 +00:00
WindowsManifest
XRay Use the container form llvm::sort(C, ...) 2018-09-30 22:31:29 +00:00
CMakeLists.txt
LLVMBuild.txt [XRay] Clean up XRay build configuration 2018-09-24 05:28:01 +00:00