Skip to content

Commit b735205

Browse files
committed
Rebase and address comments
Created using spr 1.3.6-beta.1
2 parents 0e88278 + e7fd10e commit b735205

File tree

107 files changed

+704
-2358
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+704
-2358
lines changed

.icslock

Whitespace-only changes.

bolt/unittests/Core/MCPlusBuilder.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,15 +90,14 @@ INSTANTIATE_TEST_SUITE_P(AArch64, MCPlusBuilderTester,
9090
::testing::Values(Triple::aarch64));
9191

9292
TEST_P(MCPlusBuilderTester, AliasX0) {
93-
uint64_t AliasesX0[] = {AArch64::W0, AArch64::W0_HI,
94-
AArch64::X0, AArch64::W0_W1,
93+
uint64_t AliasesX0[] = {AArch64::W0, AArch64::X0, AArch64::W0_W1,
9594
AArch64::X0_X1, AArch64::X0_X1_X2_X3_X4_X5_X6_X7};
9695
size_t AliasesX0Count = sizeof(AliasesX0) / sizeof(*AliasesX0);
9796
testRegAliases(Triple::aarch64, AArch64::X0, AliasesX0, AliasesX0Count);
9897
}
9998

10099
TEST_P(MCPlusBuilderTester, AliasSmallerX0) {
101-
uint64_t AliasesX0[] = {AArch64::W0, AArch64::W0_HI, AArch64::X0};
100+
uint64_t AliasesX0[] = {AArch64::W0, AArch64::X0};
102101
size_t AliasesX0Count = sizeof(AliasesX0) / sizeof(*AliasesX0);
103102
testRegAliases(Triple::aarch64, AArch64::X0, AliasesX0, AliasesX0Count, true);
104103
}

clang/docs/ReleaseNotes.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,6 @@ X86 Support
752752
- Support ISA of ``AMX-MOVRS``.
753753
- Support ISA of ``AMX-AVX512``.
754754
- Support ISA of ``AMX-TF32``.
755-
- Support ISA of ``MOVRS``.
756755

757756
Arm and AArch64 Support
758757
^^^^^^^^^^^^^^^^^^^^^^^

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,6 @@ def TargetELF : TargetSpec {
477477
def TargetELFOrMachO : TargetSpec {
478478
let ObjectFormats = ["ELF", "MachO"];
479479
}
480-
def TargetIFuncSupport : TargetSpec {
481-
let CustomCode = [{ Target.supportsIFunc() }];
482-
}
483480
def TargetWindowsArm64EC : TargetSpec {
484481
let CustomCode = [{ Target.getTriple().isWindowsArm64EC() }];
485482
}
@@ -1858,7 +1855,7 @@ def IBOutletCollection : InheritableAttr {
18581855
let Documentation = [Undocumented];
18591856
}
18601857

1861-
def IFunc : Attr, TargetSpecificAttr<TargetIFuncSupport> {
1858+
def IFunc : Attr, TargetSpecificAttr<TargetELFOrMachO> {
18621859
let Spellings = [GCC<"ifunc">];
18631860
let Args = [StringArgument<"Resolver">];
18641861
let Subjects = SubjectList<[Function]>;

clang/include/clang/Basic/AttrDocs.td

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6051,19 +6051,12 @@ declared entity. The entity must not have weak linkage; for example, in C++,
60516051
it cannot be applied to a declaration if a definition at that location would be
60526052
considered inline.
60536053

6054-
Not all targets support this attribute:
6055-
6056-
- ELF target support depends on both the linker and runtime linker, and is
6057-
available in at least lld 4.0 and later, binutils 2.20.1 and later, glibc
6058-
v2.11.1 and later, and FreeBSD 9.1 and later.
6059-
- Mach-O targets support it, but with slightly different semantics: the resolver
6060-
is run at first call, instead of at load time by the runtime linker.
6061-
- Windows target supports it on AArch64, but with different semantics: the
6062-
``ifunc`` is replaced with a global function pointer, and the call is replaced
6063-
with an indirect call. The function pointer is initialized by a constructor
6064-
that calls the resolver.
6065-
- Baremetal target supports it on AVR.
6066-
- Other targets currently do not support this attribute.
6054+
Not all targets support this attribute. ELF target support depends on both the
6055+
linker and runtime linker, and is available in at least lld 4.0 and later,
6056+
binutils 2.20.1 and later, glibc v2.11.1 and later, and FreeBSD 9.1 and later.
6057+
Mach-O targets support it, but with slightly different semantics: the resolver
6058+
is run at first call, instead of at load time by the runtime linker. Targets
6059+
other than ELF and Mach-O currently do not support this attribute.
60676060
}];
60686061
}
60696062

clang/include/clang/Basic/BuiltinsX86.def

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -660,9 +660,6 @@ TARGET_BUILTIN(__builtin_ia32_vpdpbuud256, "V8iV8iV8iV8i", "ncV:256:", "avxvnnii
660660
TARGET_BUILTIN(__builtin_ia32_vpdpbuuds128, "V4iV4iV4iV4i", "ncV:128:", "avxvnniint8|avx10.2-256")
661661
TARGET_BUILTIN(__builtin_ia32_vpdpbuuds256, "V8iV8iV8iV8i", "ncV:256:", "avxvnniint8|avx10.2-256")
662662

663-
// MOVRS
664-
TARGET_BUILTIN(__builtin_ia32_prefetchrs, "vvC*", "nc", "movrs")
665-
666663
TARGET_BUILTIN(__builtin_ia32_gather3div2df, "V2dV2dvC*V2OiUcIi", "nV:128:", "avx512vl")
667664
TARGET_BUILTIN(__builtin_ia32_gather3div2di, "V2OiV2OivC*V2OiUcIi", "nV:128:", "avx512vl")
668665
TARGET_BUILTIN(__builtin_ia32_gather3div4df, "V4dV4dvC*V4OiUcIi", "nV:256:", "avx512vl")

clang/include/clang/Basic/BuiltinsX86_64.def

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,6 @@ TARGET_BUILTIN(__builtin_ia32_aand64, "vv*SOi", "n", "raoint")
228228
TARGET_BUILTIN(__builtin_ia32_aor64, "vv*SOi", "n", "raoint")
229229
TARGET_BUILTIN(__builtin_ia32_axor64, "vv*SOi", "n", "raoint")
230230

231-
// MOVRS
232-
TARGET_BUILTIN(__builtin_ia32_movrsqi, "ScvC*", "n", "movrs")
233-
TARGET_BUILTIN(__builtin_ia32_movrshi, "SsvC*", "n", "movrs")
234-
TARGET_BUILTIN(__builtin_ia32_movrssi, "SivC*", "n", "movrs")
235-
TARGET_BUILTIN(__builtin_ia32_movrsdi, "SLLivC*", "n", "movrs")
236-
237231
// MOVRS and AVX10.2
238232
TARGET_BUILTIN(__builtin_ia32_vmovrsb128, "V16cV16cC*", "nV:128:", "movrs,avx10.2-256")
239233
TARGET_BUILTIN(__builtin_ia32_vmovrsb256, "V32cV32cC*", "nV:256:", "movrs,avx10.2-256")

clang/include/clang/Basic/TargetInfo.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,10 +1497,6 @@ class TargetInfo : public TransferrableTargetInfo,
14971497
bool supportsIFunc() const {
14981498
if (getTriple().isOSBinFormatMachO())
14991499
return true;
1500-
if (getTriple().isOSWindows() && getTriple().isAArch64())
1501-
return true;
1502-
if (getTriple().getArch() == llvm::Triple::ArchType::avr)
1503-
return true;
15041500
return getTriple().isOSBinFormatELF() &&
15051501
((getTriple().isOSLinux() && !getTriple().isMusl()) ||
15061502
getTriple().isOSFreeBSD());

clang/include/clang/Basic/arm_sve.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1964,7 +1964,7 @@ let SVETargetGuard = "sve2,lut,bf16", SMETargetGuard = "sme2,lut,bf16" in {
19641964
////////////////////////////////////////////////////////////////////////////////
19651965
// SVE2 - Optional
19661966

1967-
let SVETargetGuard = "sve2,sve-aes", SMETargetGuard = InvalidMode in {
1967+
let SVETargetGuard = "sve2-aes", SMETargetGuard = InvalidMode in {
19681968
def SVAESD : SInst<"svaesd[_{d}]", "ddd", "Uc", MergeNone, "aarch64_sve_aesd", [IsOverloadNone]>;
19691969
def SVAESIMC : SInst<"svaesimc[_{d}]", "dd", "Uc", MergeNone, "aarch64_sve_aesimc", [IsOverloadNone]>;
19701970
def SVAESE : SInst<"svaese[_{d}]", "ddd", "Uc", MergeNone, "aarch64_sve_aese", [IsOverloadNone]>;

clang/lib/Basic/Targets/AArch64.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions &Opts,
473473
if (HasSVE2p1)
474474
Builder.defineMacro("__ARM_FEATURE_SVE2p1", "1");
475475

476-
if (HasSVE2 && HasSVEAES)
476+
if (HasSVE2 && HasSVE2AES)
477477
Builder.defineMacro("__ARM_FEATURE_SVE2_AES", "1");
478478

479479
if (HasSVE2 && HasSVE2BitPerm)
@@ -769,7 +769,7 @@ bool AArch64TargetInfo::hasFeature(StringRef Feature) const {
769769
.Case("f32mm", FPU & SveMode && HasMatmulFP32)
770770
.Case("f64mm", FPU & SveMode && HasMatmulFP64)
771771
.Case("sve2", FPU & SveMode && HasSVE2)
772-
.Case("sve-aes", HasSVEAES)
772+
.Case("sve2-pmull128", FPU & SveMode && HasSVE2AES)
773773
.Case("sve2-bitperm", FPU & SveMode && HasSVE2BitPerm)
774774
.Case("sve2-sha3", FPU & SveMode && HasSVE2SHA3)
775775
.Case("sve2-sm4", FPU & SveMode && HasSVE2SM4)
@@ -861,10 +861,12 @@ bool AArch64TargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
861861
HasSVE2 = true;
862862
HasSVE2p1 = true;
863863
}
864-
if (Feature == "+sve-aes") {
864+
if (Feature == "+sve2-aes") {
865865
FPU |= NeonMode;
866+
FPU |= SveMode;
866867
HasFullFP16 = true;
867-
HasSVEAES = true;
868+
HasSVE2 = true;
869+
HasSVE2AES = true;
868870
}
869871
if (Feature == "+sve2-sha3") {
870872
FPU |= NeonMode;

0 commit comments

Comments
 (0)