Skip to content
Unverified Commit 8fc0aca5 authored by Björn Pettersson's avatar Björn Pettersson Committed by GitHub
Browse files

[SCEV] Support larger than 64-bit types in ashr(add(shl(x, n), c), m) (#71600)

In commit 5a9a02f6 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.
parent 3716b5b4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment