1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib
Mehdi Amini eabbdab4f5 [Scalarizer] PR28108: Skip over nullptr rather than crashing on it.
Summary:
In Scalarizer::gather we see if we already have a scattered form of Op,
and in that case use the new form.

In the particular case of PR28108, the found ValueVector SV has size 2,
where the first Value is nullptr, and the second is indeed a proper Value.
The nullptr then caused an assert to blow when we tried to do
cast<Instruction>(SV[I]).

With this patch we check SV[I] before doing the cast, and if it's nullptr
we just skip over it.

I don't know the Scalarizer well enough to know if this is the best fix
or if something should be done else where to prevent the nullptr from
being in the ValueVector at all, but at least this avoids the crash
and looking at the test case output it looks reasonable.

Reviewers: hfinkel, frasercrmck, wala, mehdi_amini

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D21518

llvm-svn: 275359
2016-07-14 01:31:25 +00:00
..
Analysis [ConstantFolding] Fold masked loads 2016-07-14 00:29:50 +00:00
AsmParser Add writeonly IR attribute 2016-07-04 08:01:29 +00:00
Bitcode Add a libLTO API to query a memory buffer and check if it contains ObjC categories 2016-07-11 23:10:18 +00:00
CodeGen MIRParser: Fix MIRParser not reporting nullptr on error. 2016-07-14 00:42:37 +00:00
DebugInfo Dump enum unique names. 2016-07-12 03:33:48 +00:00
ExecutionEngine [Object] Revert r275316, Archive::child_iterator changes, while I update lld. 2016-07-14 00:37:04 +00:00
Fuzzer [LibFuzzer] Unbreak the build on macOS which was broken by r272858. 2016-07-07 18:14:11 +00:00
IR [IR] Make getIndexedOffsetInType return a signed result 2016-07-13 03:42:38 +00:00
IRReader
LibDriver Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI. 2016-06-29 22:27:42 +00:00
LineEditor
Linker IR: New representation for CFI and virtual call optimization pass metadata. 2016-06-24 21:21:32 +00:00
LTO New pass manager for LICM. 2016-07-12 22:37:48 +00:00
MC [MC] Fix lexing ordering in assembly label parsing to preserve same line 2016-07-13 14:03:12 +00:00
Object [Object] Revert r275316, Archive::child_iterator changes, while I update lld. 2016-07-14 00:37:04 +00:00
ObjectYAML [YAML] Fix YAML tags appearing before the start of sequence elements 2016-06-28 21:10:26 +00:00
Option
Passes Add missing files for r275222 2016-07-12 22:42:24 +00:00
ProfileData [Coverage] Mark a few methods const (NFC) 2016-07-13 23:12:23 +00:00
Support Synchronize LLVM and clang's ObjCDeclSpec::ObjCPropertyAttributeKind. 2016-07-14 00:41:18 +00:00
TableGen TableGen: promote "code" type from syntactic sugar. 2016-07-05 21:22:55 +00:00
Target Add EnableIPRA to TargetOptions, and move the cl::opt -enable-ipra to TargetMachine.cpp 2016-07-13 23:39:46 +00:00
Transforms [Scalarizer] PR28108: Skip over nullptr rather than crashing on it. 2016-07-14 01:31:25 +00:00
CMakeLists.txt
LLVMBuild.txt