[InstCombine] Remove redundant evaluateGEPOffsetExpression() fold (NFCI)
authorNikita Popov <npopov@redhat.com>
Tue, 27 Dec 2022 16:00:24 +0000 (17:00 +0100)
committerNikita Popov <npopov@redhat.com>
Tue, 27 Dec 2022 16:17:21 +0000 (17:17 +0100)
commitf7bc8e035d8d0f6b0ed3e0e4b8ed30d1adc22129
tree1e7b7c442a8fa86d26658d2178f29664a2ed7a34
parent51f2f595d146d0d4606c6528ff74c16f8a79d38e
[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.
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp