This is an archive of the discontinued LLVM Phabricator instance.

[Constants] Handle FNeg in getWithOperands.
ClosedPublic

Authored by fhahn on Aug 20 2020, 2:47 AM.

Details

Summary

Currently ConstantExpr::getWithOperands does not handle FNeg and
subsequently treats FNeg as binary operator, leading to an assertion
failure or segmentation fault if built without assertions.

Originally I reproduced this with llvm-dis on a bitcode file, which I
unfortunately cannot share and also cannot really reduce.

But PR45426 describes the same issue and has a reproducer with Clang, so
I'll go with that.

Diff Detail

Event Timeline

fhahn created this revision.Aug 20 2020, 2:47 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptAug 20 2020, 2:47 AM
fhahn requested review of this revision.Aug 20 2020, 2:47 AM
aprantl accepted this revision.Aug 20 2020, 8:31 AM
This revision is now accepted and ready to land.Aug 20 2020, 8:31 AM
This revision was landed with ongoing or failed builds.Aug 21 2020, 8:51 AM
This revision was automatically updated to reflect the committed changes.