[PATCH] D23163: [AVX512][FastISel] Do not use K registers in TEST instructions

Igor Breger via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 16 03:30:04 PDT 2016


igorb added inline comments.

================
Comment at: lib/Target/X86/X86FastISel.cpp:1695
@@ +1694,3 @@
+    unsigned ResReg = createResultReg(&X86::VK1RegClass);
+    BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc, TII.get(X86::KSHIFTLWri),
+            ResReg)
----------------
KTEST instruction require  AVX512DQ, it will fail to run (illegal instruction) on knl target.
We assume that VK1 is always zero extended, you don't need shift.
I suggest to use  KORTESTW instruction ( it require only AVX512F , available if VK1 legal ), in this case it have the same semantic.

================
Comment at: test/CodeGen/X86/fast-isel-select-cmov.ll:1
@@ -1,1 +1,2 @@
-; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10                  | FileCheck %s
+; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10                  | FileCheck %s --check-prefixes CHECK,NOAVX512
+; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 -mattr=+avx512f  | FileCheck %s --check-prefixes CHECK,AVX512
----------------
could you please change it to 
; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10                  | FileCheck %s --check-prefix=CHECK --check-prefix=NOAVX512
; RUN: llc < %s -fast-isel -fast-isel-abort=1 -mtriple=x86_64-apple-darwin10 -mattr=+avx512f  | FileCheck %s --check-prefix=CHECK --check-prefix=AVX512

and regenerate the checks using update_llc_test_checks utils. 


https://reviews.llvm.org/D23163





More information about the llvm-commits mailing list