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).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
This LGTM. We may want to revisit this later once we clarify the semantics of select and undef.