From: Simon Pilgrim Date: Fri, 9 Jun 2023 10:28:08 +0000 (+0100) Subject: [GlobalIsel][X86] Move intrinsics getActionDefinitionsBuilder defs above remaining... X-Git-Tag: upstream/17.0.6~5625 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=024e8adf5c2639f471178924233cd205a64d808d;p=platform%2Fupstream%2Fllvm.git [GlobalIsel][X86] Move intrinsics getActionDefinitionsBuilder defs above remaining legacy handling --- diff --git a/llvm/lib/Target/X86/X86LegalizerInfo.cpp b/llvm/lib/Target/X86/X86LegalizerInfo.cpp index 6af45cf..9b8b84a 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()); }