From 3528c803780d1eab548875beb1cb75e5f9b55740 Mon Sep 17 00:00:00 2001 From: Farhana Aleen Date: Tue, 21 Aug 2018 16:21:15 +0000 Subject: [PATCH] [AMDGPU] Support idot2 pattern. Summary: Transform add (mul ((i32)S0.x, (i32)S1.x), add( mul ((i32)S0.y, (i32)S1.y), (i32)S3) => i/udot2((v2i16)S0, (v2i16)S1, (i32)S3) Author: FarhanaAleen Reviewed By: arsenm Subscribers: llvm-commits, AMDGPU Differential Revision: https://reviews.llvm.org/D50024 llvm-svn: 340295 --- llvm/lib/Target/AMDGPU/AMDGPUInstructions.td | 3 + llvm/lib/Target/AMDGPU/VOP3PInstructions.td | 20 + llvm/test/CodeGen/AMDGPU/idot2.ll | 1850 ++++++++++++++++++++++++++ 3 files changed, 1873 insertions(+) create mode 100644 llvm/test/CodeGen/AMDGPU/idot2.ll diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td index c9c932e..055f2a8 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td +++ b/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td @@ -167,6 +167,9 @@ def shl_oneuse : HasOneUseBinOp; def select_oneuse : HasOneUseTernaryOp