[PATCH] D137036: [X86] Enable EVEX GFNI instructions without avx512bw.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 30 01:12:58 PDT 2022


craig.topper created this revision.
craig.topper added reviewers: RKSimon, pengfei.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added projects: clang, LLVM.

We only really need avx512bw for masking 256 or 512 bit GFNI
instructions due to the need for v32i1 or v64i1.

I wanted to enable 128-bit intrinsics with avx512vl, but the
__builtin_ia32_selectb_128 used in the header file requires avx512bw.
The codegen test for the same is also not using a masked instruction
because vselect with v16i1 mask and v16i8 is not legal so is expanded
before isel. To fix these issues we need a mask specific builtin and a
mask specific ISD opcode.

Fixes PR58687.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D137036

Files:
  clang/include/clang/Basic/BuiltinsX86.def
  clang/lib/Headers/gfniintrin.h
  clang/test/CodeGen/X86/gfni-builtins.c
  llvm/lib/Target/X86/X86InstrAVX512.td
  llvm/lib/Target/X86/X86InstrSSE.td
  llvm/test/CodeGen/X86/avx512-gfni-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137036.471819.patch
Type: text/x-patch
Size: 85154 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221030/55fe99b6/attachment-0001.bin>


More information about the cfe-commits mailing list