This is potentially more friendly for further optimizations,
analysies, e.g.: https://godbolt.org/z/G24anE
This resolves phase-ordering bug that was introduced
in D75145 for https://godbolt.org/z/2gBwF2
https://godbolt.org/z/XvgSua
Paths
| Differential D75757
[InstComine] Forego of one-use check in `(X - (X & Y)) --> (X & ~Y)` if Y is a constant ClosedPublic Authored by lebedev.ri on Mar 6 2020, 9:15 AM.
Details Summary This is potentially more friendly for further optimizations, This resolves phase-ordering bug that was introduced
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Mar 6 2020, 10:11 AM Closed by commit rG1badf7c33a5d: [InstComine] Forego of one-use check in `(X - (X & Y)) --> (X & ~Y)` if Y… (authored by lebedev.ri). · Explain WhyMar 6 2020, 11:03 AM This revision was automatically updated to reflect the committed changes. Comment Actions Like I said in D75145, this looks like it's causing a lot of other regressions, at least on the ARM benchmarks I'm running. I'm wondering if it's to do with the LTO pipeline we have. There's a chance that this is actually doing better, allowing loops after unrolling to be analysable, but now the compiler has a lot more opportunities to shoot itself in the foot.
Revision Contents
Diff 248759 llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/sub.ll
llvm/test/Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
llvm/test/Transforms/LoopUnroll/runtime-unroll-remainder.ll
llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll
llvm/test/Transforms/PhaseOrdering/reassociate-after-unroll.ll
|