E.g.
%addr1 = G_PTR_ADD %base, G_CONSTANT 20 %addr2 = G_PTR_ADD %addr1, G_CONSTANT 8 --> %addr2 = G_PTR_ADD %base, G_CONSTANT 28
Paths
| Differential D72351
[AArch64][GlobalISel] Fold a chain of two G_PTR_ADDs of constant offsets. ClosedPublic Authored by aemerson on Jan 7 2020, 11:01 AM.
Details Summary E.g. %addr1 = G_PTR_ADD %base, G_CONSTANT 20 %addr2 = G_PTR_ADD %addr1, G_CONSTANT 8 --> %addr2 = G_PTR_ADD %base, G_CONSTANT 28
Diff Detail
Event TimelineHerald added subscribers: Petar.Avramovic, volkan, hiraditya and 2 others. · View Herald TranscriptJan 7 2020, 11:01 AM This revision is now accepted and ready to land.Jan 7 2020, 11:52 AM Closed by commit rGb6598bcf4b81: [AArch64][GlobalISel] Fold a chain of two G_PTR_ADDs of constant offsets. (authored by aemerson). · Explain WhyJan 7 2020, 2:15 PM This revision was automatically updated to reflect the committed changes. aemerson marked an inline comment as done.
Revision Contents
Diff 236631 llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
llvm/include/llvm/Target/GlobalISel/Combine.td
llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
llvm/test/CodeGen/AArch64/GlobalISel/prelegalizercombiner-ptradd-chain.mir
|
Why not getConstantVRegValWithLookThrough?