The previous rule:
(insert_vector _, (extract_vector X, 0), 0) -> X
is not quite correct. The correct fold should be:
(insert_vector Y, (extract_vector X, 0), 0) -> X where: Y is X, or Y is undef
This commit updates the pattern.
Paths
| Differential D102699
[InstSimplify] Properly constrain {insert,extract}_subvector intrinsic fold ClosedPublic Authored by joechrisellis on May 18 2021, 9:57 AM.
Details Summary The previous rule: (insert_vector _, (extract_vector X, 0), 0) -> X is not quite correct. The correct fold should be: (insert_vector Y, (extract_vector X, 0), 0) -> X where: Y is X, or Y is undef This commit updates the pattern.
Diff Detail
Event TimelineComment Actions LGTM, but I missed the issue on the first iteration so please wait for a second accept. This revision is now accepted and ready to land.May 19 2021, 7:52 AM Closed by commit rG5a476987f7d6: [InstSimplify] Properly constrain {insert,extract}_subvector intrinsic fold (authored by joechrisellis). · Explain WhyMay 21 2021, 3:05 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 346206 llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/insert-vector.ll
|