OSDN Git Service

[Scalarizer] When gathering scattered scalar, don't replace it with itself
authorRoman Lebedev <lebedev.ri@gmail.com>
Tue, 7 Jul 2020 13:53:19 +0000 (16:53 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Tue, 7 Jul 2020 14:03:53 +0000 (17:03 +0300)
commit16266e63963ad6ee27ad21983a9366ab313dfd03
tree5579ccb703d505d7cf40256348055ca7b75ed09e
parentea85ff82c82687496453bc14c4ac60548a42d8f3
[Scalarizer] When gathering scattered scalar, don't replace it with itself

The (previously-crashing) test-case would cause us to seemingly-harmlessly
replace some use with something else, but we can't replace it with itself,
so we would crash.
llvm/lib/Transforms/Scalar/Scalarizer.cpp
llvm/test/Transforms/Scalarizer/crash-bug.ll