[ConstraintElim] Use helper to allow overflow for coefficients of GEPs
authorFlorian Hahn <flo@fhahn.com>
Mon, 17 Oct 2022 19:30:42 +0000 (20:30 +0100)
committerFlorian Hahn <flo@fhahn.com>
Mon, 17 Oct 2022 19:30:43 +0000 (20:30 +0100)
commit6db71b8f1418170324b49d20f1f7b3f7c5086066
tree69351b72257dbef84532c659016da9302091103d
parentd8af31ecede0c54ec667ab687784149e806c9e4c
[ConstraintElim] Use helper to allow overflow for coefficients of GEPs

If the arithmetic for indices of inbounds GEPs overflows, the result is
poison. This means it is also OK for the coefficients to overflow. GEP
decomposition is limited to cases where the index size is <= 64 bit,
which can be represented by int64_t used for the coefficients in the
constraint system.
llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll