[all-commits] [llvm/llvm-project] f7bc8e: [InstCombine] Remove redundant evaluateGEPOffsetEx...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Dec 27 08:18:00 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f7bc8e035d8d0f6b0ed3e0e4b8ed30d1adc22129
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-12-27 (Tue, 27 Dec 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp

  Log Message:
  [InstCombine] Remove redundant evaluateGEPOffsetExpression() fold (NFCI)

If we go through the generic EmitGEPOffset code, the resulting
expression can be (and is) reduced in the same way this code did
manually. There are no changes in lit tests or llvm-test-suite.

This fold predates the time where we started adding nsw to the adds
created by EmitGEPOffset, so it was likely needed back then.

This might not actually be NFC due to worklist order changes etc.

More information about the All-commits mailing list