llvm-project/llvm/test
Mehdi Amini 8484f92f7f [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 [BFI] Add new LazyBFI analysis pass 2016-07-13 05:01:48 +00:00
Assembler [ConstantFold] Don't incorrectly infer inbounds on array GEP 2016-07-13 03:24:41 +00:00
Bindings Add writeonly IR attribute 2016-07-04 08:01:29 +00:00
Bitcode Add writeonly IR attribute 2016-07-04 08:01:29 +00:00
BugPoint
CodeGen Add missing test for r275347 "[IPRA] Set callee saved registers to none for local function when IPRA is enabled." 2016-07-14 01:31:20 +00:00
DebugInfo Synchronize LLVM and clang's ObjCDeclSpec::ObjCPropertyAttributeKind. 2016-07-14 00:41:18 +00:00
Examples
ExecutionEngine ExecutionEngine: add preliminary support for COFF ARM 2016-06-24 14:11:44 +00:00
Feature Temporarily remove a test case to unblock PPC bots. 2016-07-08 00:35:39 +00:00
FileCheck Make check lines not match themselves. 2016-06-16 19:38:48 +00:00
Instrumentation [tsan] Try harder to not instrument gcov counters 2016-07-07 22:45:28 +00:00
Integer
JitListener
LTO Add a libLTO API to query a memory buffer and check if it contains ObjC categories 2016-07-11 23:10:18 +00:00
LibDriver
Linker Don't verify inputs to the Linker if ODR merging. 2016-06-29 18:31: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 Add checks to the MachOObjectFile() constructor to make sure load commands sizes 2016-07-07 22:11:42 +00:00
ObjectYAML [YAML] Fix YAML tags appearing before the start of sequence elements 2016-06-28 21:10:26 +00:00
Other Temporarily remove one test run line to unblock PPC bots. 2016-07-08 00:32:58 +00:00
SymbolRewriter
TableGen tests: accept different TargetOpcode values. 2016-07-07 17:51:42 +00:00
ThinLTO/X86 ThinLTO: Do not take into account whether a definition has multiple copies when promoting. 2016-07-07 18:31:51 +00:00
Transforms [Scalarizer] PR28108: Skip over nullptr rather than crashing on it. 2016-07-14 01:31:25 +00:00
Unit
Verifier Add writeonly IR attribute 2016-07-04 08:01:29 +00:00
YAMLParser
tools [ThinLTO/gold] Enable symbol resolution in distributed backend case 2016-07-13 16:35:56 +00:00
.clang-format
CMakeLists.txt [cmake] Fix builds with LLVM_ENABLE_PIC=0 2016-06-02 16:29:07 +00:00
TestRunner.sh
lit.cfg Review fixes to lit documentation 2016-07-12 20:59:17 +00:00
lit.site.cfg.in Add the printing the Mach-O (__LLVM,__bundle) xar archive file section "verbosely" 2016-05-23 21:34:12 +00:00