[PATCH] D156831: [AArch64][GlobalISel] Legalize integer across-lane intrinsics with actual type
Vladislav Dzhidzhoev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 15:24:16 PDT 2023
dzhidzhoev created this revision.
dzhidzhoev added reviewers: aemerson, dmgreen, paquette, arsenm, sdesmalen, t.p.northover, jroelofs.
Herald added subscribers: kerbowa, hiraditya, kristof.beyls, jvesely.
Herald added a project: All.
dzhidzhoev requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Across-lane intrinsics with integer destination type (uaddv, saddv,
umaxv, smavx, uminv, sminv) were legalized with the destination type
given in the LLVM IR intrinsic’s definition. It was wider than
the actual destination type of the corresponding machine instruction.
InstructionSelect was implicitly supposed to generate underlying
extension instructions for these intrinsics, while the real destination
type was opaque for other GlobalISel passes. Thus,
llvm/test/CodeGen/AArch64/arm64-vaddv.ll failed on GlobalISel since
the generated code was worse in functions that used the value of
an across-lane intrinsic in following FP&SIMD instructions (functions
with _used_by_laneop suffix).
Here intrinsics are legalized and selected with an actual destination
type, making it transparent to other passes. If the destination
value is used in further instructions accepting FPR registers, there
won’t be extra copies across register banks. i16 type is added to
the list of the types of the FPR16 register bank to make it possible,
and a few SelectionDAG patterns are modified to eliminate ambiguity
in TableGen.
trunc(sext x) -> x pattern is handled in artifact combiner to avoid
extra copy instructions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156831
Files:
llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
llvm/lib/Target/AArch64/AArch64InstrFormats.td
llvm/lib/Target/AArch64/AArch64InstrGISel.td
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/lib/Target/AArch64/AArch64RegisterInfo.td
llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
llvm/test/CodeGen/AArch64/arm64-smaxv.ll
llvm/test/CodeGen/AArch64/arm64-sminv.ll
llvm/test/CodeGen/AArch64/arm64-umaxv.ll
llvm/test/CodeGen/AArch64/arm64-uminv.ll
llvm/test/CodeGen/AArch64/arm64-vaddv.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/artifact-combiner-trunc.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156831.546244.patch
Type: text/x-patch
Size: 29724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230801/46802a90/attachment.bin>
More information about the llvm-commits
mailing list