diff options
| author | Joey Gouly <joey.gouly@gmail.com> | 2014-05-13 15:42:45 +0000 |
|---|---|---|
| committer | Joey Gouly <joey.gouly@gmail.com> | 2014-05-13 15:42:45 +0000 |
| commit | 12a8bf09d0751b9ed05595809879de783ceba58d (patch) | |
| tree | 799ce699ac2fcca239c27cad79195aec0f1f3b76 /llvm/lib/Transforms/Utils/Local.cpp | |
| parent | 2e7eceb317927ade7e14233d8356c7a011380c0a (diff) | |
| download | llvm-12a8bf09d0751b9ed05595809879de783ceba58d.zip llvm-12a8bf09d0751b9ed05595809879de783ceba58d.tar.gz llvm-12a8bf09d0751b9ed05595809879de783ceba58d.tar.bz2 | |
[CGP] r205941 changed the logic, so that a cast happens *before* 'Result' is
compared to 'AddrMode.BaseReg'. In the case that 'AddrMode.BaseReg' is
nullptr, 'Result' will also be nullptr, so the cast causes an assertion. We
should use dyn_cast_or_null here to check 'Result' is not null and it is an
instruction.
Bug found by Mats Petersson, and I reduced his IR to get a test case.
llvm-svn: 208705
Diffstat (limited to 'llvm/lib/Transforms/Utils/Local.cpp')
0 files changed, 0 insertions, 0 deletions
