Skip to content

Commit 2d25908

Browse files
committed
Revert "[Downstream change] Cherry-pick of [TargetParser] Normalize "aarch64-amazon-linux" to "aarch64-amazon-linux-gnu" (#535)"
This reverts commit 956585f.
1 parent 956585f commit 2d25908

File tree

5 files changed

+1
-37
lines changed

5 files changed

+1
-37
lines changed

llvm/include/llvm/TargetParser/Triple.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,7 @@ class Triple {
197197
SUSE,
198198
OpenEmbedded,
199199
Intel,
200-
// Downstream issue: #533 (Amazon Linux still not recognized correctly)
201-
Amazon,
202-
LastVendorType = Amazon
200+
LastVendorType = Intel
203201
};
204202
enum OSType {
205203
UnknownOS,

llvm/lib/TargetParser/Triple.cpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -271,9 +271,6 @@ StringRef Triple::getVendorTypeName(VendorType Kind) {
271271
case PC: return "pc";
272272
case SCEI: return "scei";
273273
case SUSE: return "suse";
274-
// Downstream issue: #533 (Amazon Linux still not recognized correctly)
275-
case Amazon:
276-
return "amazon";
277274
}
278275

279276
llvm_unreachable("Invalid VendorType!");
@@ -672,8 +669,6 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
672669
.Case("suse", Triple::SUSE)
673670
.Case("oe", Triple::OpenEmbedded)
674671
.Case("intel", Triple::Intel)
675-
// Downstream issue: #533 (Amazon Linux still not recognized correctly)
676-
.Case("amazon", Triple::Amazon)
677672
.Default(Triple::UnknownVendor);
678673
}
679674

@@ -1306,14 +1301,6 @@ std::string Triple::normalize(StringRef Str, CanonicalForm Form) {
13061301
if (Vendor == Triple::SUSE && Environment == llvm::Triple::GNUEABI)
13071302
Components[3] = "gnueabihf";
13081303

1309-
// Downstream issue: #533 (Amazon Linux still not recognized correctly)
1310-
// Amazon Linux uses a "gnu" environment by default.
1311-
if (Environment == Triple::UnknownEnvironment && Vendor == Triple::Amazon &&
1312-
OS == Triple::Linux) {
1313-
Components.resize(4);
1314-
Components[3] = "gnu";
1315-
}
1316-
13171304
if (OS == Triple::Win32) {
13181305
Components.resize(4);
13191306
Components[2] = "windows";

llvm/test/CodeGen/AArch64/veclib-llvm.sincos.ll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --filter "(bl|ptrue)" --version 5
22
; RUN: llc -mtriple=aarch64-gnu-linux -mattr=+neon,+sve -vector-library=sleefgnuabi < %s | FileCheck %s -check-prefix=SLEEF
33
; RUN: llc -mtriple=aarch64-gnu-linux -mattr=+neon,+sve -vector-library=ArmPL < %s | FileCheck %s -check-prefix=ARMPL
4-
; NOTE: Downstream issue: #533 (Amazon Linux still not recognized correctly)
5-
; Check we expand to a vector library call on aarch64-amazon-linux:
6-
; RUN: llc -mtriple=aarch64-amazon-linux -mattr=+neon,+sve -vector-library=sleefgnuabi < %s | FileCheck %s -check-prefix=SLEEF
7-
; RUN: llc -mtriple=aarch64-amazon-linux -mattr=+neon,+sve -vector-library=ArmPL < %s | FileCheck %s -check-prefix=ARMPL
84

95
define void @test_sincos_v4f32(<4 x float> %x, ptr noalias %out_sin, ptr noalias %out_cos) {
106
; SLEEF-LABEL: test_sincos_v4f32:

llvm/test/Transforms/LoopVectorize/AArch64/multiple-result-intrinsics.ll

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --filter "(:|sincos|modf|extractvalue|store)" --version 5
22
; RUN: opt -passes=loop-vectorize -mtriple=aarch64-gnu-linux -mcpu=neoverse-v1 -mattr=+sve < %s -S -o - -debug-only=loop-vectorize 2>%t.1 | FileCheck %s --check-prefix=CHECK
33
; RUN: opt -passes=loop-vectorize -mtriple=aarch64-gnu-linux -mcpu=neoverse-v1 -mattr=+sve -vector-library=ArmPL < %s -S -o - -debug-only=loop-vectorize 2>%t.2 | FileCheck %s --check-prefix=CHECK-ARMPL
4-
; NOTE: Downstream issue: #533 (Amazon Linux still not recognized correctly)
5-
; RUN: opt -passes=loop-vectorize -mtriple=aarch64-amazon-linux -mcpu=neoverse-v1 -mattr=+sve -vector-library=ArmPL < %s -S -o - -debug-only=loop-vectorize 2>%t.3 | FileCheck %s --check-prefix=CHECK-ARMPL
64
; RUN: FileCheck --input-file=%t.1 --check-prefix=CHECK-COST %s
75
; RUN: FileCheck --input-file=%t.2 --check-prefix=CHECK-COST-ARMPL %s
8-
; NOTE: Downstream issue: #533 (Amazon Linux still not recognized correctly)
9-
; Check we vectorize the functions with the vector-library on aarch64-amazon-linux:
10-
; RUN: FileCheck --input-file=%t.3 --check-prefix=CHECK-COST-ARMPL %s
116
; REQUIRES: asserts
127

138
; CHECK-COST-LABEL: sincos_f32

llvm/unittests/TargetParser/TripleTest.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,6 @@ TEST(TripleTest, ParsedIDs) {
126126
EXPECT_EQ(Triple::Hurd, T.getOS());
127127
EXPECT_EQ(Triple::GNU, T.getEnvironment());
128128

129-
// Downstream issue: #533 (Amazon Linux still not recognized correctly)
130-
T = Triple("aarch64-amazon-linux");
131-
EXPECT_EQ(Triple::aarch64, T.getArch());
132-
EXPECT_EQ(Triple::Amazon, T.getVendor());
133-
EXPECT_EQ(Triple::Linux, T.getOS());
134-
135129
T = Triple("arm-unknown-linux-android16");
136130
EXPECT_EQ(Triple::arm, T.getArch());
137131
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
@@ -1442,12 +1436,6 @@ TEST(TripleTest, Normalization) {
14421436

14431437
EXPECT_EQ("x86_64-unknown-linux-gnu", Triple::normalize("x86_64-gnu-linux"));
14441438

1445-
// Downstream issue: #533 (Amazon Linux still not recognized correctly)
1446-
EXPECT_EQ("aarch64-amazon-linux-gnu",
1447-
Triple::normalize("aarch64-amazon-linux"));
1448-
EXPECT_EQ("x86_64-amazon-linux-gnu",
1449-
Triple::normalize("x86_64-amazon-linux"));
1450-
14511439
EXPECT_EQ("a-unknown-unknown",
14521440
Triple::normalize("a", Triple::CanonicalForm::THREE_IDENT));
14531441
EXPECT_EQ("a-b-unknown",

0 commit comments

Comments
 (0)