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

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 25 23:59:50 PDT 2017


zvi added a comment.

LGTM. I think it would be best if Elena or Guy took a look too.



================
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,
----------------
Consider refactoring this recurring patterns in a follow-up patch.


================
Comment at: test/CodeGen/X86/avx512-calling-conv.ll:301
 ; SKX-NEXT:    movb $85, %al
-; SKX-NEXT:    kmovb %eax, %k1
+; SKX-NEXT:    kmovd %eax, %k1
 ; SKX-NEXT:    kandb %k1, %k0, %k0
----------------
Don't know the answer to this from the top of my head, but is the combination
  movb
  kmovd
Inferior to
  movb
  kmovb
with respect to partial register stall?


================
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
----------------
Can these unrelated changed be committed separately?


https://reviews.llvm.org/D30968





More information about the llvm-commits mailing list