[all-commits] [llvm/llvm-project] 5a4f19: Add tests to reproduce pointer/index width confusi...

Krzysztof Drewniak via All-commits all-commits at lists.llvm.org
Thu Feb 23 14:50:56 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a4f193afa0d73f7ec459648d8f02535577dd604
      https://github.com/llvm/llvm-project/commit/5a4f193afa0d73f7ec459648d8f02535577dd604
  Author: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
  Date:   2023-02-23 (Thu, 23 Feb 2023)

  Changed paths:
    A llvm/test/Transforms/LowerTypeTests/distinct-index-width-crash.ll
    A llvm/test/Transforms/MergeFunc/different-index-width-gep-crash.ll
    A llvm/test/Transforms/MergeICmps/X86/distinct-index-width-crash.ll

  Log Message:
  -----------
  Add tests to reproduce pointer/index width confusion crashes

Some calls to GEPOperator::accumulateConstantOffset(APInt) passed the
pointer bitwidth as the width of the APInt, while the function asserts
that the width of its argument is equal to the index width of the GEP
pointer input. These values are almost always the same, so mixing up
which call to use doesn't usually cause issues. However, when dealing
with data layouts where these values are different, the passes tested
here can crash.

This will be fixed in D143437 .

Differential Revision: https://reviews.llvm.org/D144673




More information about the All-commits mailing list