[PATCH] D67437: [SystemZ] Swap compare operands in foldMemoryOperandImpl() if possible.

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 08:19:21 PST 2019


jonpa updated this revision to Diff 227883.
jonpa added a comment.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Patch rebased and using LivePhysRegs. New tests added.

I thought about using a CutOff counter in the search for CC Users (a value of 50 is NFC on SPEC 2006). But then I thought that maybe this isn't really needed since many instructions define CC at which point the search stops...

I also realized that we could do WFCDB -> CDBR -> CDB, WFCSB -> CEBR -> CEB if the non-spilled reg is allocated to FP bank (and possibly also constrain a non-allocated reg to FP reg). This compare could also be swapped since the CC=3 for FP compares would not have to be handled, right? I am thinking this could wait until this patch has been committed, but not sure if it would be better to do both at the same time and then run benchmarks just one time...

The instruction mix difference is about the same as before on SPEC 2006, and ~230 files are affected.


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

https://reviews.llvm.org/D67437

Files:
  llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
  llvm/lib/Target/SystemZ/SystemZInstrInfo.h
  llvm/test/CodeGen/SystemZ/int-cmp-56.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67437.227883.patch
Type: text/x-patch
Size: 17698 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191105/927597c6/attachment.bin>


More information about the llvm-commits mailing list