[PATCH] D100039: [SystemZ] Isel cleanup pass: Reuse known zeros/ones after zero-extension of i1.

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 7 08:20:04 PDT 2021


jonpa created this revision.
jonpa added a reviewer: uweigand.
Herald added subscribers: hiraditya, mgorny.
jonpa requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This patch is related to https://reviews.llvm.org/D98905 in the sense that it handles the same optimization. The difference is that this version adds a pass after isel in order to have a global scope available (instead of working on the DAG). The idea is to only reuse the known immediate when there is no other user.

Experiments show so far that this is a less aggressive overall change: less (~5000 instead of ~9000) immediate loads eliminated, but also less register moves introduced.

I suppose adding a new separate "isel cleanup" pass is a bigger change per se, but on the other hand it might be acceptable as an intermediate step towards the "global isel" change that has been under development for years now. Of course, benchmarks would have to prove the worth also, and I will post the benchmark results shortly.


https://reviews.llvm.org/D100039

Files:
  llvm/lib/Target/SystemZ/CMakeLists.txt
  llvm/lib/Target/SystemZ/SystemZ.h
  llvm/lib/Target/SystemZ/SystemZISelCleanupPass.cpp
  llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp
  llvm/test/CodeGen/SystemZ/int-cmp-59.ll
  llvm/test/CodeGen/SystemZ/setcc-05.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100039.335814.patch
Type: text/x-patch
Size: 10717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210407/d007d697/attachment.bin>


More information about the llvm-commits mailing list