This is an archive of the discontinued LLVM Phabricator instance.

[PowerPC] Fix for PR33636
ClosedPublic

Authored by nemanjai on Jun 29 2017, 3:21 AM.

Details

Summary

When folding to a constant, it is possible to get an undef. Casting such a node to a ConstSDNode does not work. This patch just avoids such a cast to prevent a crash.
Posting this for review rather than just committing the fix in case we want to do something different on undef (i.e. use some marker value since we should be free to use any value here).

Diff Detail

Repository
rL LLVM

Event Timeline

nemanjai created this revision.Jun 29 2017, 3:21 AM
nemanjai edited the summary of this revision. (Show Details)
hfinkel accepted this revision.Jun 29 2017, 8:06 AM

This LGTM. We may want to revisit this later once we clarify the semantics of select and undef.

This revision is now accepted and ready to land.Jun 29 2017, 8:06 AM
This revision was automatically updated to reflect the committed changes.