GetElementPtr instructions require the extra check that all operands after the first must only be constants and be exactly the same to be considered similar.
Tests are found in unittests/Analysis/IRSimilarityIdentifierTest.cpp.
Paths
| Differential D87315
[IRSim] Letting gep instructions be legal for similarity identification. ClosedPublic Authored by AndrewLitteken on Sep 8 2020, 11:45 AM.
Details
Diff Detail Event TimelineAndrewLitteken added a child revision: D87317: [IRSim][IROutliner] Allowing GEP instructions to be outlined..Sep 8 2020, 11:46 AM AndrewLitteken added a parent revision: D86978: [IROutliner] Deduplicating functions that only require inputs.. Comment Actions LGTM
This revision is now accepted and ready to land.Sep 14 2020, 5:21 PM
Revision Contents
Diff 290554 llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
llvm/lib/Analysis/IRSimilarityIdentifier.cpp
llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
|
auto *GEP is probably appropriate here, if you want, since the type name gets repeated.