[all-commits] [llvm/llvm-project] 793eb0: [InstSimplify] Make sure offsets have same size in...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jun 27 06:21:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 793eb0c0e4ffadc1cfebcda0c0cb1bcc2311def2
      https://github.com/llvm/llvm-project/commit/793eb0c0e4ffadc1cfebcda0c0cb1bcc2311def2
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-06-27 (Tue, 27 Jun 2023)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp

  Log Message:
  -----------
  [InstSimplify] Make sure offsets have same size in computePointerICmp()

The way this is currently implemented the accumulated offsets can
end up having a different size, which causes unnecessary
complication for further extension of the code.

Don't strip pointer casts at the start and rely on
stripAndAccumulate to do any necessary stripping. It gracefully
handles different index sizes and will always retain the width of
the original pointer index type.

This is not NFC, but unlikely to make any practical difference.




More information about the All-commits mailing list