[llvm] 024e8ad - [GlobalIsel][X86] Move intrinsics getActionDefinitionsBuilder defs above remaining legacy handling
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 9 03:53:35 PDT 2023
Author: Simon Pilgrim
Date: 2023-06-09T11:49:14+01:00
New Revision: 024e8adf5c2639f471178924233cd205a64d808d
URL: https://github.com/llvm/llvm-project/commit/024e8adf5c2639f471178924233cd205a64d808d
DIFF: https://github.com/llvm/llvm-project/commit/024e8adf5c2639f471178924233cd205a64d808d.diff
LOG: [GlobalIsel][X86] Move intrinsics getActionDefinitionsBuilder defs above remaining legacy handling
Added:
Modified:
llvm/lib/Target/X86/X86LegalizerInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86LegalizerInfo.cpp b/llvm/lib/Target/X86/X86LegalizerInfo.cpp
index 6af45cf698d9e..9b8b84a66462f 100644
--- a/llvm/lib/Target/X86/X86LegalizerInfo.cpp
+++ b/llvm/lib/Target/X86/X86LegalizerInfo.cpp
@@ -331,6 +331,15 @@ X86LegalizerInfo::X86LegalizerInfo(const X86Subtarget &STI,
.clampScalar(0, s8, sMaxScalar)
.clampScalar(1, s32, s32);
+ // memory intrinsics
+ getActionDefinitionsBuilder({G_MEMCPY, G_MEMMOVE, G_MEMSET}).libcall();
+
+ // fp intrinsics
+ getActionDefinitionsBuilder(G_INTRINSIC_ROUNDEVEN)
+ .scalarize(0)
+ .minScalar(0, LLT::scalar(32))
+ .libcall();
+
setLegalizerInfo32bit();
setLegalizerInfo64bit();
setLegalizerInfoSSE1();
@@ -339,11 +348,6 @@ X86LegalizerInfo::X86LegalizerInfo(const X86Subtarget &STI,
setLegalizerInfoAVX2();
setLegalizerInfoAVX512();
- getActionDefinitionsBuilder(G_INTRINSIC_ROUNDEVEN)
- .scalarize(0)
- .minScalar(0, LLT::scalar(32))
- .libcall();
-
auto &LegacyInfo = getLegacyLegalizerInfo();
LegacyInfo.setLegalizeScalarToDifferentSizeStrategy(G_PHI, 0, widen_1);
for (unsigned MemOp : {G_LOAD, G_STORE})
@@ -353,8 +357,6 @@ X86LegalizerInfo::X86LegalizerInfo(const X86Subtarget &STI,
G_PTR_ADD, 1,
LegacyLegalizerInfo::widenToLargerTypesUnsupportedOtherwise);
- getActionDefinitionsBuilder({G_MEMCPY, G_MEMMOVE, G_MEMSET}).libcall();
-
LegacyInfo.computeTables();
verify(*STI.getInstrInfo());
}
More information about the llvm-commits
mailing list