[ConstantRange] Optimize smul_sat() (NFC)
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 27 Oct 2021 13:12:02 +0000 (15:12 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 27 Oct 2021 19:01:09 +0000 (21:01 +0200)
commitea7be26045e2f4fbf0a3ceb8842b024e3eb6e8a5
tree0a412df782cf385bfb427776d18fd4f756962092
parentb7e12ca7aab73a00d7a7a2fbbd5214dde9353335
[ConstantRange] Optimize smul_sat() (NFC)

Base the implementation on the APInt smul_sat() implementation,
which is much more efficient than performing calculations in
double the bitwidth.
llvm/lib/IR/ConstantRange.cpp