Skip to content
Commit 12a8bf09 authored by Joey Gouly's avatar Joey Gouly
Browse files

[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
parent 2e7eceb3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment