[PATCH] D76705: [SystemZ] Improve foldMemoryOperandImpl: vec->FP conversions

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 28 10:44:32 PDT 2020


jonpa updated this revision to Diff 260688.
jonpa added a comment.

> Yes, of course -- but isn't that already in your patch (line 1184)?

Ah - I meant a test as in "test case", which I could not find in the new tests...

> I don't think I understand this -- looking at the code in question, CC does appear to be killed in that instruction. Is this not right? If it is, why does recomputing live intervals remove the flag?

It will be eventually added again after regalloc (not until PostRA Machine Scheduler since it is not allocatable), but this particular test case only runs the greedy pass so that will be seen in the output.

> So it is a bit weird that the vec->fp renaming is done here for Unary and Compare, but is not done (and instead done in the reverse direction by the MemFold pseudos) for Binary and Ternary. It would be nicer if this were symmetric.

It seems that (as long as we don't want to change existing mappings on the scalar instructions)

WFSQDB has to change the name since SQDBR is already mapped to SQDB:

SQDBR  ->OpKey:SQDBR-> SQDB
WFSQDB ->OpKey:SQDBR-> SQDB

So in trying to do the OpKey processing on the register instruction side to make it more symmetric, I find that

ADBR is mapped to ADB, via OpKey:ADBR.

In order to map WFADB to ADB_MemFoldPseudo, I needed to remove "wf" and also use a "MemFold" string, since the plain "ADB" would map it to the target memory instruction.

The ternary instructions also similarly needed a "MemFold" key substring.

Is this better than previously?


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

https://reviews.llvm.org/D76705

Files:
  llvm/lib/Target/SystemZ/SystemZInstrFP.td
  llvm/lib/Target/SystemZ/SystemZInstrFormats.td
  llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
  llvm/test/CodeGen/SystemZ/foldmemop-vec-binops.mir
  llvm/test/CodeGen/SystemZ/foldmemop-vec-cc.mir
  llvm/test/CodeGen/SystemZ/foldmemop-vec-cmp.mir
  llvm/test/CodeGen/SystemZ/foldmemop-vec-fusedfp.mir
  llvm/test/CodeGen/SystemZ/foldmemop-vec-unary.mir
  llvm/test/CodeGen/SystemZ/int-cmp-56.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76705.260688.patch
Type: text/x-patch
Size: 158909 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200428/8adc8689/attachment.bin>


More information about the llvm-commits mailing list