Page MenuHomePhabricator

Constant expression as fmul operand in InstCombiner asserts

Authored by pawel.jurek on Mar 4 2015, 12:06 AM.



In InstCombiner pass, visitFMul function uses a helper function: isFiniteNonZeroFp.
This function does a dyn_cast on result from getAggregateElement, which can be nullptr in case of constant expression operand.
This leads to null pointer dereference in isa<> template, and assert:
assert(Val && "isa<> used on a null pointer");

Diff Detail


Event Timeline

pawel.jurek retitled this revision from to Constant expression as fmul operand in InstCombiner asserts.
pawel.jurek updated this object.
pawel.jurek edited the test plan for this revision. (Show Details)
pawel.jurek added reviewers: bkramer, majnemer.
pawel.jurek set the repository for this revision to rL LLVM.
pawel.jurek added a subscriber: Unknown Object (MLST).
majnemer accepted this revision.Mar 4 2015, 11:03 PM
majnemer edited edge metadata.


This revision is now accepted and ready to land.Mar 4 2015, 11:03 PM
This revision was automatically updated to reflect the committed changes.