[PATCH] D89692: [SCEV] SCEVPtrToIntExpr simplifications

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 1 00:07:22 PDT 2020


lebedev.ri added a comment.

In D89692#2366320 <https://reviews.llvm.org/D89692#2366320>, @dmgreen wrote:

> Hello. This increased codesize by a chunk on one of the testcases we track. Part of csibe/zlib. I've put a reproducer in https://godbolt.org/z/o58s7d. I've not really looked any deeper, other than it's quite a bit longer even without outlining, happens on the few architectures I tried and possibly something is going odd in LSR? It was (comparatively) a fairly big chunk of codesize across zlib, not just this file.

Hmm. In that snipped, after middle-end, the IR is identical.
But if i llvm-reduce that snippet based on the criteria that the final assembly differs, i get F13628102: reduced.ll <https://reviews.llvm.org/F13628102>
And if we compare `llc -debug -print-before-all` logs: F13628111: llc.log <https://reviews.llvm.org/F13628111>,
indeed, it would seem like that allowed LSR to change pointer-typed PHI into an integer-typed one,
which ends up being bad for the final code size.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89692/new/

https://reviews.llvm.org/D89692



More information about the llvm-commits mailing list