This is an alternative to D98120. Herein, instead of deleting the transformation entirely, we check
that the underlying objects are both the same and therefore this transformation wouldn't incur a
provenance change, if applied.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
Alright, LGTM, thank you.
The compile-time impact is surprisingly small:
https://llvm-compile-time-tracker.com/compare.php?from=7ee96429a0b057bcc97331a6a762fc3cd00aed61&to=7a9ffc7e84bb3222bfd0e58144c57ef7b26ebce7&stat=instructions
There are small filesize changes, so this does prevent some of the transformations.
You might want to follow up with an adjustment for the corresponding InstSimplify transform at https://github.com/llvm/llvm-project/blob/7d7001b2cbd05bb1955c18e7f8668644bd1258dc/llvm/lib/Analysis/InstructionSimplify.cpp#L4360.