In an upcoming patch we would like to check if a regular base opcode has a corresponding VP opcode, so this changes the signature to return std::nullopt instead of LLVM_UNREACHABLE.
Where we previously relied on it to be unreachable, we just manually assert has_value() instead.
Details
Details
- Reviewers
fakepaper56 craig.topper frasercrmck reames
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
937 | I think we're supposed to use operator* instead of value(). There were commits like this in December [lldb] llvm::Optional::value() && => operator*/operator-> std::optional::value() has undesired exception checking semantics and is unavailable in older Xcode (see _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS). The call sites block std::optional migration. |
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | ||
---|---|---|
937 | Good shout. Hopefully we can still use has_value(), I've changed it to just manually assert it. |
I think we're supposed to use operator* instead of value().
There were commits like this in December