[PATCH] D82464: [AArch64][SVE] Predicate bfloat16 load patterns with HasBF16
Francesco Petrogalli via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 13:01:48 PDT 2020
fpetrogalli requested changes to this revision.
fpetrogalli added inline comments.
This revision now requires changes to proceed.
================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:12076-12077
EVT PtrTy = N->getOperand(3).getValueType();
+ const bool hasBF16 =
+ static_cast<const AArch64Subtarget &>(DAG.getSubtarget()).hasBF16();
+
----------------
No need to set up a variable when it is used only once. Please move it inside the assertion.
================
Comment at: llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td:1526
+
+ let Predicates = [HasBF16] in {
+ defm : pred_load<nxv8bf16, nxv8i1, nonext_masked_load, LD1H, LD1H_IMM, am_sve_regreg_lsl1>;
----------------
`[HasBF16, HasSVE]`, same for the `Predicates` below.
================
Comment at: llvm/test/CodeGen/AArch64/sve-intrinsics-ld1-addressing-mode-reg-imm.ll:1
-; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve < %s | FileCheck %s
+; RUN: llc -mtriple=aarch64-linux-gnu -mattr=+sve,+bf16 < %s | FileCheck %s
----------------
Nit: as I mentioned in https://reviews.llvm.org/D82492#inline-758743, maybe it is worth extracting the bf16 tests in a separate `*-bfloat.ll` file as we have done for the ACLEs.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82464/new/
https://reviews.llvm.org/D82464
More information about the llvm-commits
mailing list