-
Notifications
You must be signed in to change notification settings - Fork 10.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[VE] VEC_BROADCAST, lowering and isel
This defines the vec_broadcast SDNode along with lowering and isel code. We also remove unused type mappings for the vector register classes (all vector MVTs that are not used in the ISA go). We will implement support for short vectors later by intercepting nodes with illegal vector EVTs before LLVM has had a chance to widen them. Reviewed By: kaz7 Differential Revision: https://reviews.llvm.org/D91646
- Loading branch information
Showing
7 changed files
with
426 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
//===-- VEInstrPatternsVec.td - VEC_-type SDNodes and isel for VE Target --===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file describes the VEC_* prefixed intermediate SDNodes and their | ||
// isel patterns. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
//===----------------------------------------------------------------------===// | ||
// Instruction format superclass | ||
//===----------------------------------------------------------------------===// | ||
|
||
// Custom intermediate ISDs. | ||
class IsVLVT<int OpIdx> : SDTCisVT<OpIdx,i32>; | ||
def vec_broadcast : SDNode<"VEISD::VEC_BROADCAST", SDTypeProfile<1, 2, [SDTCisVec<0>, IsVLVT<2>]>>; | ||
|
||
multiclass vbrd_elem32<ValueType v32, ValueType s32, SDPatternOperator ImmOp, SDNodeXForm ImmCast, int SubRegIdx> { | ||
// VBRDil | ||
def : Pat<(v32 (vec_broadcast (s32 ImmOp:$sy), i32:$vl)), | ||
(VBRDil (ImmCast $sy), i32:$vl)>; | ||
|
||
// VBRDrl | ||
def : Pat<(v32 (vec_broadcast s32:$sy, i32:$vl)), | ||
(VBRDrl | ||
(INSERT_SUBREG (i64 (IMPLICIT_DEF)), $sy, SubRegIdx), | ||
i32:$vl)>; | ||
} | ||
|
||
defm : vbrd_elem32<v256f32, f32, simm7fp, LO7FP, sub_f32>; | ||
defm : vbrd_elem32<v256i32, i32, simm7, LO7, sub_i32>; | ||
|
||
multiclass vbrd_elem64<ValueType v64, ValueType s64, SDPatternOperator ImmOp, SDNodeXForm ImmCast> { | ||
// VBRDil | ||
def : Pat<(v64 (vec_broadcast (s64 ImmOp:$sy), i32:$vl)), | ||
(VBRDil (ImmCast $sy), i32:$vl)>; | ||
|
||
// VBRDrl | ||
def : Pat<(v64 (vec_broadcast s64:$sy, i32:$vl)), | ||
(VBRDrl s64:$sy, i32:$vl)>; | ||
} | ||
|
||
defm : vbrd_elem64<v256f64, f64, simm7fp, LO7FP>; | ||
defm : vbrd_elem64<v256i64, i64, simm7, LO7>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.