[PATCH] D89203: [VE][NFC] Clean VEISelLowering.cpp
Kazushi Marukawa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 11 04:59:57 PDT 2020
kaz7 created this revision.
kaz7 added projects: LLVM, VE.
Herald added subscribers: llvm-commits, hiraditya.
kaz7 requested review of this revision.
Clean the order of setOperationActions and others.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D89203
Files:
llvm/lib/Target/VE/VEISelLowering.cpp
Index: llvm/lib/Target/VE/VEISelLowering.cpp
===================================================================
--- llvm/lib/Target/VE/VEISelLowering.cpp
+++ llvm/lib/Target/VE/VEISelLowering.cpp
@@ -635,23 +635,27 @@
addRegisterClass(MVT::f128, &VE::F128RegClass);
/// Load & Store {
- for (MVT FPVT : MVT::fp_valuetypes()) {
- for (MVT OtherFPVT : MVT::fp_valuetypes()) {
- // Turn FP extload into load/fpextend
- setLoadExtAction(ISD::EXTLOAD, FPVT, OtherFPVT, Expand);
- // Turn FP truncstore into trunc + store.
- setTruncStoreAction(FPVT, OtherFPVT, Expand);
- }
- }
-
- // VE doesn't have i1 sign extending load
+ // VE doesn't have i1 sign extending load.
for (MVT VT : MVT::integer_valuetypes()) {
setLoadExtAction(ISD::SEXTLOAD, VT, MVT::i1, Promote);
setLoadExtAction(ISD::ZEXTLOAD, VT, MVT::i1, Promote);
setLoadExtAction(ISD::EXTLOAD, VT, MVT::i1, Promote);
setTruncStoreAction(VT, MVT::i1, Expand);
}
+
+ // VE doesn't have floating point extload/truncstore, so expand them.
+ for (MVT FPVT : MVT::fp_valuetypes()) {
+ for (MVT OtherFPVT : MVT::fp_valuetypes()) {
+ setLoadExtAction(ISD::EXTLOAD, FPVT, OtherFPVT, Expand);
+ setTruncStoreAction(FPVT, OtherFPVT, Expand);
+ }
+ }
+
+ // VE doesn't have fp128 load/store, so expand them in custom lower.
+ setOperationAction(ISD::LOAD, MVT::f128, Custom);
+ setOperationAction(ISD::STORE, MVT::f128, Custom);
+
/// } Load & Store
// Custom legalize address nodes into LO/HI parts.
@@ -735,10 +739,6 @@
// VE doesn't have fdiv of f128.
setOperationAction(ISD::FDIV, MVT::f128, Expand);
- // VE doesn't have load/store of f128, so use custom-lowering.
- setOperationAction(ISD::LOAD, MVT::f128, Custom);
- setOperationAction(ISD::STORE, MVT::f128, Custom);
-
for (MVT FPVT : {MVT::f32, MVT::f64}) {
// f32 and f64 uses ConstantFP. f128 uses ConstantPool.
setOperationAction(ISD::ConstantFP, FPVT, Legal);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89203.297455.patch
Type: text/x-patch
Size: 1987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201011/a052e4af/attachment.bin>
More information about the llvm-commits
mailing list