[ConstantFold] ConstantFoldGetElementPtr - use APInt::isNegative() instead of getSExt...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 24 Sep 2021 17:08:56 +0000 (18:08 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Fri, 24 Sep 2021 17:18:53 +0000 (18:18 +0100)
commitbdee805b3277e04677490f42e62aa28478331254
tree3fd6a084e13f9413a5ab7e6a6a1e72eccbd81e48
parent36eb6c0134afa9d6881e52c002743f4594c859ee
[ConstantFold] ConstantFoldGetElementPtr - use APInt::isNegative() instead of getSExtValue() to support big ints

Fixes fuzz test: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39197
llvm/lib/IR/ConstantFold.cpp
llvm/test/Transforms/SCCP/apint-bigint2.ll