Skip to content

Commit 1aea024

Browse files
[LLVM][SVE] Add isel for bfloat based select operations. (#128881)
Patch also adds missing tests for unpacked half and float types.
1 parent c93dc58 commit 1aea024

File tree

3 files changed

+181
-63
lines changed

3 files changed

+181
-63
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1701,6 +1701,8 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
17011701
setOperationAction(ISD::FP_ROUND, VT, Custom);
17021702
setOperationAction(ISD::MLOAD, VT, Custom);
17031703
setOperationAction(ISD::INSERT_SUBVECTOR, VT, Custom);
1704+
setOperationAction(ISD::SELECT, VT, Custom);
1705+
setOperationAction(ISD::SELECT_CC, VT, Expand);
17041706
setOperationAction(ISD::SPLAT_VECTOR, VT, Legal);
17051707
setOperationAction(ISD::VECTOR_DEINTERLEAVE, VT, Custom);
17061708
setOperationAction(ISD::VECTOR_INTERLEAVE, VT, Custom);

llvm/lib/Target/AArch64/SVEInstrFormats.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1962,6 +1962,8 @@ multiclass sve_int_sel_vvv<string asm, SDPatternOperator op> {
19621962
def : SVE_3_Op_Pat<nxv2f64, op, nxv2i1, nxv2f64, nxv2f64, !cast<Instruction>(NAME # _D)>;
19631963

19641964
def : SVE_3_Op_Pat<nxv8bf16, op, nxv8i1, nxv8bf16, nxv8bf16, !cast<Instruction>(NAME # _H)>;
1965+
def : SVE_3_Op_Pat<nxv4bf16, op, nxv4i1, nxv4bf16, nxv4bf16, !cast<Instruction>(NAME # _S)>;
1966+
def : SVE_3_Op_Pat<nxv2bf16, op, nxv2i1, nxv2bf16, nxv2bf16, !cast<Instruction>(NAME # _D)>;
19651967

19661968
def : InstAlias<"mov $Zd, $Pg/m, $Zn",
19671969
(!cast<Instruction>(NAME # _B) ZPR8:$Zd, PPRAny:$Pg, ZPR8:$Zn, ZPR8:$Zd), 1>;

0 commit comments

Comments
 (0)