[all-commits] [llvm/llvm-project] b9dc56: [GVN] Encode GEPs in offset representation
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Apr 28 00:33:00 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b9dc5651477b4c3c132662e763308b27963248a9
https://github.com/llvm/llvm-project/commit/b9dc5651477b4c3c132662e763308b27963248a9
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-04-28 (Thu, 28 Apr 2022)
Changed paths:
M llvm/include/llvm/Transforms/Scalar/GVN.h
M llvm/lib/Transforms/Scalar/GVN.cpp
M llvm/test/Transforms/GVN/opaque-ptr.ll
Log Message:
-----------
[GVN] Encode GEPs in offset representation
When using opaque pointers, convert GEPs into offset representation
of the form P + V1 * Scale1 + V2 * Scale2 + ... + ConstantOffset.
This allows us to recognize equivalent address calculations even if
the GEPs don't use the same source element type.
This fixes an opaque pointer codegen regression seen in rustc.
Differential Revision: https://reviews.llvm.org/D124527
More information about the All-commits
mailing list