[PATCH] D118316: [PowerPC] Materialize special ConstantFP using instructions instead of load from TOC

Ting Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 16:31:11 PST 2022


tingwang added a comment.

In D118316#3300414 <https://reviews.llvm.org/D118316#3300414>, @nemanjai wrote:

> I am wondering if you have done any performance comparison or even just latency/throughput "back-of-the-envelope" computation for this. It doesn't seem obvious to me that this is better than a CP load. The conversion is a fairly expensive instruction. Another less compelling thing to consider is that in high register pressure situations (for VMX registers), the `VSPLTISW` may cause a spill.
>
> One thing to note is that this necessarily replaces the cracked `lfs` instruction which is also expensive, so this transformation may be worthwhile. However, I wonder how this transformation would compare to stopping the conversion from double precision to single precision for constants on Power9 (i.e. return `false` from `ShouldShrinkFPConstant()` on Power9). This would of course grow the constant pool in situations where a lot of compact constants are loaded, but presumably this is a somewhat rare situation.

Hi Nemanja, I measured there is no performance change on spec base fprate, so I think should abandon this one. Sorry for the bother. By the way, flip ShouldShrinkFPConstant() improved single-copy base fprate by about 0.2%, though it's single run result.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118316



More information about the llvm-commits mailing list