[PATCH] D42989: [X86] When doing callee save/restore for k-registers make sure we don't use KMOVQ on non-BWI targets

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 23:08:35 PST 2018


craig.topper 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");
----------------
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.


https://reviews.llvm.org/D42989





More information about the llvm-commits mailing list