This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add intrinsics for KADD instructions
ClosedPublic

Authored by craig.topper on Aug 28 2018, 11:00 AM.

Details

Summary

These are intrinsics for supporting kadd builtins in clang. These builtins are already in gcc to implement intrinsics from icc. Though they are missing from the Intel Intrinsics Guide.

This instruction adds two mask registers together as if they were scalar rather than a vXi1. We might be able to get away with a bitcast to scalar and a normal add instruction, but that would require DAG combine smarts in the backend to recoqnize add+bitcast. For now I'd prefer to go with the easiest implementation so we can get these builtins in to clang with good codegen.

Diff Detail

Event Timeline

craig.topper created this revision.Aug 28 2018, 11:00 AM
This revision is now accepted and ready to land.Aug 28 2018, 11:14 AM
This revision was automatically updated to reflect the committed changes.