[all-commits] [llvm/llvm-project] 359bc5: [ConstraintElim] Bail out for GEPs when index size...

Florian Hahn via All-commits all-commits at lists.llvm.org
Thu Oct 13 02:20:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 359bc5c541ae4b02ad74bb9a9c3cb64e61464a4a
      https://github.com/llvm/llvm-project/commit/359bc5c541ae4b02ad74bb9a9c3cb64e61464a4a
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2022-10-13 (Thu, 13 Oct 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
    M llvm/test/Transforms/ConstraintElimination/large-constant-ints.ll

  Log Message:
  -----------
  [ConstraintElim] Bail out for GEPs when index size > 64 bits.

Limit pointer decomposition to pointers with index sizes of at most 64
bits. int64_t is used for coefficients, so as long as the index size <=
64 bits we should be able to represent all pointer offsets.

Pointer decomposition is limited to inbounds GEPs, so if a index
computation would overflow the result is poison, so it doesn't matter
that the coefficient overflows.

This allows replacing MulOverflow with regular multiplications.




More information about the All-commits mailing list