[all-commits] [llvm/llvm-project] ee6abe: [ValueTracking] Interpret GEPs as a series of adds...
qcolombet via All-commits
all-commits at lists.llvm.org
Wed Oct 21 15:07:31 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ee6abef5323d59b983129bf3514ef6775d1d6cd5
https://github.com/llvm/llvm-project/commit/ee6abef5323d59b983129bf3514ef6775d1d6cd5
Author: Quentin Colombet <qcolombet at apple.com>
Date: 2020-10-21 (Wed, 21 Oct 2020)
Changed paths:
M llvm/lib/Analysis/ValueTracking.cpp
M llvm/test/Transforms/InstCombine/constant-fold-address-space-pointer.ll
M llvm/test/Transforms/InstCombine/constant-fold-gep.ll
M llvm/unittests/Analysis/ValueTrackingTest.cpp
Log Message:
-----------
[ValueTracking] Interpret GEPs as a series of adds multiplied by the related scaling factor
Prior to this patch, computeKnownBits would only try to deduce trailing zeros
bits for getelementptrs. This patch adds the logic to treat geps as a series
of add * scaling factor.
Thanks to this patch, using a gep or performing an address computation
directly "by hand" (ptrtoint followed by adds and mul followed by inttoptr)
offers the same computeKnownBits information.
Previously, the "by hand" approach would have given more information.
This is related to https://llvm.org/PR47241.
Differential Revision: https://reviews.llvm.org/D86364
More information about the All-commits
mailing list