[PATCH] D30968: [AVX-512] Fix accidental uses of AH/BH/CH/DH after copies to/from mask registers

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 26 00:08:47 PDT 2017

craig.topper added inline comments.

Comment at: lib/Target/X86/X86FastISel.cpp:547
       unsigned KValReg = ValReg;
-      ValReg = createResultReg(Subtarget->is64Bit() ? &X86::GR8RegClass
-                                                    : &X86::GR8_ABCD_LRegClass);
+      ValReg = createResultReg(&X86::GR32RegClass);
       BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc,
zvi wrote:
> Consider refactoring this recurring patterns in a follow-up patch.
Once Guy makes i1 illegal this probably goes away?

Comment at: test/CodeGen/X86/avx512-intrinsics.ll:92
 ; CHECK-NEXT:    kmovw %k0, %eax
+; CHECK-NEXT:    ## kill: %AX<def> %AX<kill> %EAX<kill>
 ; CHECK-NEXT:    retq
zvi wrote:
> Can these unrelated changed be committed separately?
This patch made this appear. Its not there without this patch because we were much more silently converting ax to eax before. Now because we use INSERT_SUBREG this shows up.


More information about the llvm-commits mailing list