[PATCH] D27684: [X86][SSE] Fix domains for VZEXT_LOAD type instructions

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 04:25:16 PST 2016


RKSimon added a comment.

In https://reviews.llvm.org/D27684#620495, @zansari wrote:

> I'm working on getting some confirmation on the latest ones, but most current Core architectures suffer a 1-clk penalty switching between fp and int domains. This doesn't include the Atom line, which can do it for free.
>
> The 1 clk isn't insignificant if you're latency bound and you do a lot of switching on the critical path. I'm not familiar with the code that decides to switch, but can it take architectures and maybe code size into consideration (i.e. favor smaller encoding with Os/Oz)?


Float domain is the default as we assume that float instructions are at least as small as the equivalent double/integer alternatives (this was true in SSE days, not so certain about the latest instruction sets) - this is why most domain agnostic code ends up using floats. Through that we get some optsize automatically without requiring Os/Oz. There is nothing to ensure we always use the shortest instruction (domain switches be damned).

We don't do much for specific architectures - we currently filter just by a target's instruction set - as the code is really only there to try and maintain a particular domain as long as possible.


Repository:
  rL LLVM

https://reviews.llvm.org/D27684





More information about the llvm-commits mailing list