[PATCH] D151710: [X86][BF16] Share FP16 vector ABI with BF16
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 30 23:01:33 PDT 2023
pengfei added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:642
+ // Have a try for bf16 because some targets share its ABI with fp16.
+ if (ValueEVT == MVT::bf16 && PartEVT == MVT::f16)
+ Val = DAG.getNode(ISD::BITCAST, DL,
----------------
RKSimon wrote:
> Do we need a TLI callback / legality check for f16?
I think not. The `PartVT` comes from `TLI.getRegisterTypeForCallingConv`. We don't need to add another callback and targets use this way should have already made f16 legal.
I can add an `TLI.isTypeLegal(PartVT)` if you wish.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151710/new/
https://reviews.llvm.org/D151710
More information about the llvm-commits
mailing list