This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Setting missing isLaneQ attribute on Neon Intrisics definitions
AbandonedPublic

Authored by pratlucas on Feb 14 2020, 5:52 AM.

Details

Reviewers
None
Summary

Some of the '*_laneq' intrinsics defined in arm_neon.td were missing the
setting of the 'isLaneQ' attribute. This patch sets the attribute on the
re lated definitions, as they will be required to properly perform range
checks on their lane arguments.

[ARM] Keeping sign information on bitcasts for Neon vdot_lane intrinsics

Sign information was being lost on Neon's vdot_lane intrinsics arguments
when bitcasting explicitly to uint32 vector types. This patch introduces
a new cast option to allow casting the operand to the equivalent vector
type of 32-bit integers, keeping the sign information.

[ARM] Creating 'call_mangled' for Neon intrinsics definitions

As multiple versions ofthe same Neon intrinsic can be created through
the same TableGen definition with the same argument types, the existing
'call' operator is not always able to properly perform overload
resolutions.

As these different intrinsic versions are diferentiated later on by the
NeonEmitter through name mangling, this patch introduces a new
'call_mangled' operator to the TableGen definitions, which allows a call
for an otherwise ambiguous intrinsic by matching its mangled name with
the mangled variation of the caller.

[ARM] Enabling range checks on Neon intrinsics' lane arguments

Range checks were not properly performed in the lane arguments of Neon
intrinsics implemented based on splat operations. Calls to those
intrinsics where translated to builtinshufflevector calls directly
by the pre-processor through the arm_neon.h macros, missing the chance
for the proper range checks.

This patch enables the range check by introducing an auxiliary splat
instruction in arm_neon.td, delaying the translation to shufflevector
calls to CGBuiltin.cpp in clang after the checks were performed.

Event Timeline

pratlucas created this revision.Feb 14 2020, 5:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2020, 5:52 AM
pratlucas abandoned this revision.Feb 14 2020, 6:01 AM