Get sign extended value if possible
Declared in <llvm/ADT/APInt.h>
std::optional<int64_t>
trySExtValue() const;
This method attempts to return the value of this APInt as a sign extended int64_t. The bitwidth must be <= 64 or the value must fit within an int64_t. Otherwise no value is returned.
The sign-extended value, or std::nullopt if it does not fit.