This adds a single combine for GlobalISel to fold:
ptradd (inttoptr C1) C2
Into:
C1 + C2
Additionally, a small test for AArch64 is added.
Paths
| Differential D88865
[GISel] Add combine for constant G_PTR_ADD offsets. ClosedPublic Authored by pnappa on Oct 5 2020, 6:43 PM.
Details
Summary This adds a single combine for GlobalISel to fold: ptradd (inttoptr C1) C2 Into: C1 + C2 Additionally, a small test for AArch64 is added.
Diff Detail Event Timelinepnappa edited reviewers, added: aditya_nandakumar, arsenm, paquette, aemerson; removed: hiraditya.Oct 5 2020, 10:14 PM aemerson added inline comments.
This revision is now accepted and ready to land.Oct 7 2020, 10:28 PM
Revision Contents
Diff 296865 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/combine-ptradd-int2ptr.mir
|
Do we not have a constant fold group? Probably should