Files
clang-p2996/llvm/test/Analysis/ScalarEvolution
Björn Pettersson 8fc0aca5d1 [SCEV] Support larger than 64-bit types in ashr(add(shl(x, n), c), m) (#71600)
In commit 5a9a02f67b scalar evolution got support for
computing SCEV:s for (ashr(add(shl(x, n), c), m)) constructs. The code
however used APInt::getZExtValue without first checking that the APInt
would fit inside an uint64_t. When for example using 128-bit types we
ended up in assertion failures (or maybe miscompiles in non-assert
builds).
This patch simply avoid converting from APInt to uint64_t when creating
the truncated constant. We can just truncate the APInt instead.
2023-11-08 11:29:12 +01:00
..