[PATCH] D151313: [RISCV][BF16] Make backend type bf16 to follow the psABI
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 12:52:45 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:428
setLoadExtAction(ISD::EXTLOAD, MVT::f32, MVT::f16, Expand);
+ setLoadExtAction(ISD::EXTLOAD, MVT::f32, MVT::bf16, Expand);
setTruncStoreAction(MVT::f32, MVT::f16, Expand);
----------------
This wasn't needed by D151663? Is there a test case missing from D151663 that requires this?
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:432
+ setOperationAction(ISD::FP_TO_BF16, MVT::f32, Custom);
+ setOperationAction(ISD::BF16_TO_FP, MVT::f32, Custom);
setOperationAction(ISD::IS_FPCLASS, MVT::f32, Custom);
----------------
D151663 uses
```
setOperationAction(ISD::FP_TO_BF16, MVT::f32,
Subtarget.isSoftFPABI() ? LibCall : Custom);
```
Is that difference important?
================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2461
+ if (Op.getOperand(0).getValueType() == MVT::bf16) {
+ Op0 =
+ DAG.getNode(ISD::ANY_EXTEND, DL, XLenVT,
----------------
Why wasn't this part needed in D151663?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151313/new/
https://reviews.llvm.org/D151313
More information about the llvm-commits
mailing list