This commit removes some redundant {insert,extract}_vector intrinsic
chains by implementing the following patterns as instsimplifies:
(insert_vector _, (extract_vector X, 0), 0) -> X (extract_vector (insert_vector _, X, 0), 0) -> X
Paths
| Differential D101986
[InstSimplify] Remove redundant {insert,extract}_vector intrinsic chains ClosedPublic Authored by joechrisellis on May 6 2021, 3:56 AM.
Details Summary This commit removes some redundant {insert,extract}_vector intrinsic (insert_vector _, (extract_vector X, 0), 0) -> X (extract_vector (insert_vector _, X, 0), 0) -> X
Diff Detail
Event TimelineHerald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMay 6 2021, 3:56 AM This revision is now accepted and ready to land.May 12 2021, 7:22 AM This revision was landed with ongoing or failed builds.May 13 2021, 9:10 AM Closed by commit rG2ed7db0d206b: [InstSimplify] Remove redundant {insert,extract}_vector intrinsic chains (authored by joechrisellis). · Explain Why This revision was automatically updated to reflect the committed changes. paulwalker-arm added inline comments.
Revision Contents
Diff 343350 clang/test/CodeGen/attr-arm-sve-vector-bits-call.c
clang/test/CodeGen/attr-arm-sve-vector-bits-cast.c
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/extract-vector.ll
llvm/test/Transforms/InstSimplify/insert-vector.ll
|
Are you sure this transform is correct? I would have thought the following are safe:
when X->getType() == ReturnType but nothing else.