Go to file
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
clang Add a comment mirroring the one in LLVM's Dwarf.h 2016-07-14 00:42:53 +00:00
clang-tools-extra [include-fixer] Implement adding missing namespace qualifiers in vim integration. 2016-07-13 16:43:54 +00:00
compiler-rt [RT-ARM] Syntax unified for aeabi_mem* functions 2016-07-13 14:01:15 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc configure: Remove device specific defines 2016-06-17 20:30:50 +00:00
libcxx Constuct a sentry object in istream::readsome, and handle failures appropriately. Fixes PR#28217. 2016-07-13 16:58:48 +00:00
libcxxabi Fix [libcxxabi] Fix warning about uninitialized const member. 2016-06-15 19:59:16 +00:00
libunwind [PATCH] [libunwind][ehabi] Use early returns where possible. 2016-07-08 12:13:31 +00:00
lld Update the readme text. 2016-07-13 19:14:25 +00:00
lldb Added test for setting breakpoints by basename and fullname. 2016-07-13 22:38:54 +00:00
llgo [llgo] llgoi: separate evaluation from printing 2016-04-25 01:18:20 +00:00
llvm [Scalarizer] PR28108: Skip over nullptr rather than crashing on it. 2016-07-14 01:31:25 +00:00
openmp http://reviews.llvm.org/D22134: Implementation of OpenMP 4.5 nonmonotonic schedule modifier 2016-07-11 10:44:57 +00:00
parallel-libs Change mailing list names in README 2016-06-24 22:50:09 +00:00
polly PPCGCodegen: Support compilation without GPU support 2016-07-13 19:52:24 +00:00