[PATCH] D74086: [SystemZ] Add a subtarget cache like some other targets already have.

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 08:01:57 PST 2020


uweigand accepted this revision.
uweigand added a comment.
This revision is now accepted and ready to land.

In D74086#1865011 <https://reviews.llvm.org/D74086#1865011>, @jonpa wrote:

> It seems that the general precedence (when invoking llc) is that first (in reverse order) is "target-features", and then -mattr. So for example a function with the attribute "target-features"="-vector" compiled with llc -mattr=+vector, gets a (SystemZTargetMachine::getSubtargetImpl) FS -vector,+vector, meaning that +vector wins.


Huh, that seems unexpected.  But as long as it's not a SystemZ problem, I guess it's just the way it is ...

> To get the behaviour you expected for soft-float (like also other targets seem to have), it seems easiest then to do like the other targets and check for the "use-soft-float"="true" attribute, and in that case add a final and decisive +soft-float to FS (this is not the way e.g. [+-]vector works per above, but maybe there is a reason for this?).

OK, let's just mirror what everybody else is doing, then.

Patch LGTM.  Thanks!


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

https://reviews.llvm.org/D74086





More information about the llvm-commits mailing list