tschuett added a comment. There is as `trySextValue` in APInt: https://reviews.llvm.org/D139683. Maybe you need a `tryMul`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140347/new/ https://reviews.llvm.org/D140347