[PATCH] D42989: [X86] When doing callee save/restore for k-registers make sure we don't use KMOVQ on non-BWI targets
Elena Demikhovsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 23:52:11 PST 2018
delena added inline comments.
================
Comment at: lib/Target/X86/X86InstrInfo.cpp:6922
return load ? X86::LD_Fp32m : X86::ST_Fp32m;
- if (X86::VK32RegClass.hasSubClassEq(RC))
+ if (X86::VK32RegClass.hasSubClassEq(RC)) {
+ assert(STI.hasBWI() && "KMOVD requires BWI");
----------------
craig.topper wrote:
> delena wrote:
> > if you'll check STI and choose KMOVW here instead of KMOVD it will be enough.
> I considered that but it would also hide PR36254 and maybe other future bugs. So I thought it was best to try to fix the issue closer to its source.
But we do this for all other cases in this function - we check target and generate the right instruction.
IMO, accumulating logic in one place is always better than spreading it over the code.
https://reviews.llvm.org/D42989
More information about the llvm-commits
mailing list