[PATCH] D58633: [InstCombine] remove one-use restriction for icmp+add constant fold
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 28 11:46:31 PST 2019
dmgreen added a comment.
Yep. I think that makes sense to me. Would be good to remove the hack. And LSR should handle most of these cases. I think there's times when it doesn't do what it should, though.
This is one example, out of libjpeg I think, but I got it from csibe. It's was just the first I looked at that was larger than before:
https://reviews.llvm.org/P8129
Compiled with something like "opt -instcombine -o - -S jdmarker.ll | llc - -o -", vs without the instcombine. Codesize is a little bigger than it was, I think maybe something about the loops (not in simple form?) is making the SCEV's not useful, so LSR isn't transforming these back.
I don't know if this is representative of the other changes. Over all the benchmarks I ran, this patch seemed to be (on average, very slightly) worse overall than before, both for perf and codesize. Not by a long way, and there are certainly some improvements in there.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58633/new/
https://reviews.llvm.org/D58633
More information about the llvm-commits
mailing list