[AMDGPU] More codegen patterns for v2i16/v2f16 build_vector
authorJay Foad <jay.foad@amd.com>
Wed, 16 Sep 2020 15:44:31 +0000 (16:44 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 22 Sep 2020 09:41:38 +0000 (10:41 +0100)
commit892ef2e3c0b60656a95d0d9e9f458b73238b21b7
tree3817563735add11d0e228c73b7dc1d7d7de4fe7c
parentb4fa884a73c5c883723738f67ad1810a6d48cc2d
[AMDGPU] More codegen patterns for v2i16/v2f16 build_vector

It's simpler to do this at codegen time than to do ad-hoc constant
folding of machine instructions in SIFoldOperands.

Differential Revision: https://reviews.llvm.org/D88028
llvm/lib/Target/AMDGPU/SIFoldOperands.cpp
llvm/lib/Target/AMDGPU/SIInstructions.td
llvm/test/CodeGen/AMDGPU/constant-fold-imm-immreg.mir
llvm/test/CodeGen/AMDGPU/fcanonicalize.f16.ll