[clang] [flang] [lld] [AMDGPU] Remove R600 usage from clang, flang and lld tests. NFC (PR #245524)

Harrison Hao via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 24 01:53:45 PST 2026


https://github.com/harrisonGPU updated https://github.com/llvm/llvm-project/pull/245524

>From d7518c5ac06d3acc2b5de55e95a76554bc147d2b Mon Sep 17 00:00:00 2001
From: Harrison Hao <tsworld1314 at gmail.com>
Date: Tue, 24 Nov 2026 15:41:34 +0800
Subject: [PATCH 1/2] [AMDGPU] Remove R600 usage from clang, flang and lld
 tests. NFC

Test cleanup plan for removing the R600 (TeraScale) backend:
* [x] clang, flang, lld tests (this patch)
* [ ] llvm tests

Tests that only cover R600 are deleted. In tests shared with other
targets, the r600 RUN lines and their now unused checks are removed.
annotations-global.c tests annotations on globals in a non zero address
space, so it is retargeted to amdgpu, which also uses `G1`:

```
// RUN: %clang_cc1 %s -triple r600 -emit-llvm -o - | FileCheck %s --check-prefix AS1-GLOBALS
// AS1-GLOBALS: target datalayout = "{{.+}}-A5-G1"
  -->
// RUN: %clang_cc1 %s -triple amdgpu -emit-llvm -o - | FileCheck %s --check-prefix AS1-GLOBALS
// AS1-GLOBALS: target datalayout = "{{.+}}-A5-G1{{.*}}"
```

The `__builtin_r600_*` builtins and the r600 triple are still in clang,
but no test covers them now. A follow up patch removes them.

RFC:
https://discourse.llvm.org/t/rfc-amdgpu-deprecating-and-removing-llvm-s-r600-terascale-backend/92840
---
 clang/test/CodeGen/annotations-global.c       |   4 +-
 .../test/CodeGen/backend-unsupported-error.ll |  44 -----
 clang/test/CodeGen/ext-int-cc.c               |  10 --
 clang/test/CodeGen/target-data.c              |  16 +-
 clang/test/CodeGenOpenCL/address-spaces.cl    |   2 -
 .../CodeGenOpenCL/amdgpu-abi-struct-coerce.cl |   1 -
 .../CodeGenOpenCL/amdgpu-sizeof-alignof.cl    |   6 -
 clang/test/CodeGenOpenCL/builtins-r600.cl     |  57 -------
 clang/test/CodeGenOpenCL/fpmath.cl            |   2 -
 clang/test/Driver/amdgpu-macros.cl            |  61 -------
 clang/test/Driver/amdgpu-mcpu.cl              |  48 ------
 clang/test/Driver/fsanitize.c                 |   2 -
 clang/test/Misc/r600.languageOptsOpenCL.cl    | 153 ------------------
 clang/test/Misc/r600.unsupported_core.cl      |   9 --
 .../test/Misc/target-invalid-cpu-note/r600.c  |  34 ----
 clang/test/Preprocessor/init-amdgpu.c         |   5 -
 clang/test/Preprocessor/init.c                |   1 -
 .../Preprocessor/predefined-arch-macros.c     |  14 --
 .../predefined-macros-no-warnings.c           |   1 -
 clang/test/Sema/attr-model.cpp                |   3 +-
 clang/test/SemaCUDA/amdgpu-bf16.cu            |  57 -------
 clang/test/SemaOpenCL/features.cl             |   8 -
 clang/test/SemaOpenCL/fp64-fp16-options.cl    |  17 --
 flang/test/Driver/target-cpu-features.f90     |   6 -
 lld/test/ELF/lto/r600.ll                      |  12 --
 25 files changed, 7 insertions(+), 566 deletions(-)
 delete mode 100644 clang/test/CodeGen/backend-unsupported-error.ll
 delete mode 100644 clang/test/CodeGenOpenCL/builtins-r600.cl
 delete mode 100644 clang/test/Misc/r600.languageOptsOpenCL.cl
 delete mode 100644 clang/test/Misc/r600.unsupported_core.cl
 delete mode 100644 clang/test/Misc/target-invalid-cpu-note/r600.c
 delete mode 100644 clang/test/SemaCUDA/amdgpu-bf16.cu
 delete mode 100644 lld/test/ELF/lto/r600.ll

diff --git a/clang/test/CodeGen/annotations-global.c b/clang/test/CodeGen/annotations-global.c
index 1ae80ef49acd75..4a66d154741f29 100644
--- a/clang/test/CodeGen/annotations-global.c
+++ b/clang/test/CodeGen/annotations-global.c
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s --implicit-check-not='section "llvm.metadata"'
-// RUN: %clang_cc1 %s -triple r600 -emit-llvm -o - | FileCheck %s --check-prefix AS1-GLOBALS
+// RUN: %clang_cc1 %s -triple amdgpu -emit-llvm -o - | FileCheck %s --check-prefix AS1-GLOBALS
 // END.
 
 static __attribute((annotate("sfoo_0"))) __attribute((annotate("sfoo_1"))) char sfoo;
@@ -44,7 +44,7 @@ __attribute((address_space(1))) __attribute__((annotate("addrspace1_ann"))) char
 // CHECK-SAME: { ptr @a,
 // CHECK-SAME: }], section "llvm.metadata"
 
-// AS1-GLOBALS: target datalayout = "{{.+}}-A5-G1"
+// AS1-GLOBALS: target datalayout = "{{.+}}-A5-G1{{.*}}"
 // AS1-GLOBALS: @llvm.global.annotations = appending addrspace(1) global [11 x { ptr addrspace(1), ptr addrspace(4), ptr addrspace(4), i32, ptr addrspace(4) }]
 // AS1-GLOBALS-SAME: { ptr addrspace(1) @a.bar,
 // AS1-GLOBALS-SAME: { ptr addrspace(1) @addrspace1_var,
diff --git a/clang/test/CodeGen/backend-unsupported-error.ll b/clang/test/CodeGen/backend-unsupported-error.ll
deleted file mode 100644
index 156777fb01e4f4..00000000000000
--- a/clang/test/CodeGen/backend-unsupported-error.ll
+++ /dev/null
@@ -1,44 +0,0 @@
-; RUN: not %clang_cc1 -triple r600-unknown-unknown -S -o - %s 2>&1 | FileCheck %s
-; REQUIRES: amdgpu-registered-target
-
-; This is to check that backend errors for unsupported features are formatted correctly
-
-; CHECK: error: test.c:2:20: in function bar i32 (): unsupported call to function foo
-
-target triple = "r600-unknown-unknown"
-
-; Function Attrs: nounwind uwtable
-define i32 @bar() #0 !dbg !4 {
-entry:
-  %call = call i32 @foo(), !dbg !12
-  ret i32 %call, !dbg !13
-}
-
-; Function Attrs: nounwind uwtable
-define i32 @foo() #0 !dbg !8 {
-entry:
-  %call = call i32 @bar(), !dbg !14
-  ret i32 %call, !dbg !15
-}
-
-attributes #0 = { nounwind noinline "disable-tail-calls"="false" "frame-pointer"="all" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "use-soft-float"="false" }
-
-!llvm.dbg.cu = !{!0}
-!llvm.module.flags = !{!9, !10}
-!llvm.ident = !{!11}
-
-!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0", isOptimized: false, runtimeVersion: 0, emissionKind: 1, enums: !2)
-!1 = !DIFile(filename: "test.c", directory: "")
-!2 = !{}
-!4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, retainedNodes: !2)
-!5 = !DISubroutineType(types: !6)
-!6 = !{!7}
-!7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
-!8 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2)
-!9 = !{i32 2, !"Dwarf Version", i32 4}
-!10 = !{i32 2, !"Debug Info Version", i32 3}
-!11 = !{!"clang version 3.9.0"}
-!12 = !DILocation(line: 2, column: 20, scope: !4)
-!13 = !DILocation(line: 2, column: 13, scope: !4)
-!14 = !DILocation(line: 3, column: 20, scope: !8)
-!15 = !DILocation(line: 3, column: 13, scope: !8)
diff --git a/clang/test/CodeGen/ext-int-cc.c b/clang/test/CodeGen/ext-int-cc.c
index 09e9279fa7cc05..31e044e9071c52 100644
--- a/clang/test/CodeGen/ext-int-cc.c
+++ b/clang/test/CodeGen/ext-int-cc.c
@@ -12,7 +12,6 @@
 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple spir -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=SPIR
 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple hexagon -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=HEX
 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple lanai -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=LANAI
-// RUN: %clang_cc1 -no-enable-noundef-analysis -triple r600 -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=R600
 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple arc -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=ARC
 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple xcore -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=XCORE
 // RUN: %clang_cc1 -no-enable-noundef-analysis -triple riscv64 -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=RISCV64
@@ -46,7 +45,6 @@ void ParamPassing(_BitInt(128) b, _BitInt(64) c) {}
 // SPIR: define{{.*}} spir_func void @ParamPassing(ptr byval(i128) align 8 %{{.+}}, i64 %{{.+}})
 // HEX: define{{.*}} void @ParamPassing(ptr byval(i128) align 8 %{{.+}}, i64 %{{.+}})
 // LANAI: define{{.*}} void @ParamPassing(ptr byval(i128) align 4 %{{.+}}, i64 %{{.+}})
-// R600: define{{.*}} void @ParamPassing(ptr addrspace(5) byval(i128) align 8 %{{.+}}, i64 %{{.+}})
 // ARC: define{{.*}} void @ParamPassing(ptr byval(i128) align 4 %{{.+}}, i64 inreg %{{.+}})
 // XCORE: define{{.*}} void @ParamPassing(ptr byval(i128) align 4 %{{.+}}, i64 %{{.+}})
 // RISCV64: define{{.*}} void @ParamPassing(i128 signext %{{.+}}, i64 signext %{{.+}})
@@ -76,7 +74,6 @@ void ParamPassing2(_BitInt(127) b, _BitInt(63) c) {}
 // SPIR: define{{.*}} spir_func void @ParamPassing2(ptr byval(i128) align 8 %{{.+}}, i63 %{{.+}})
 // HEX: define{{.*}} void @ParamPassing2(ptr byval(i128) align 8 %{{.+}}, i63 %{{.+}})
 // LANAI: define{{.*}} void @ParamPassing2(ptr byval(i128) align 4 %{{.+}}, i63 %{{.+}})
-// R600: define{{.*}} void @ParamPassing2(ptr addrspace(5) byval(i128) align 8 %{{.+}}, i63 %{{.+}})
 // ARC: define{{.*}} void @ParamPassing2(ptr byval(i128) align 4 %{{.+}}, i63 inreg %{{.+}})
 // XCORE: define{{.*}} void @ParamPassing2(ptr byval(i128) align 4 %{{.+}}, i63 %{{.+}})
 // RISCV64: define{{.*}} void @ParamPassing2(i127 signext %{{.+}}, i63 signext %{{.+}})
@@ -107,7 +104,6 @@ void ParamPassing3(_BitInt(15) a, _BitInt(31) b) {}
 // SPIR: define{{.*}} spir_func void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
 // HEX: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
 // LANAI: define{{.*}} void @ParamPassing3(i15 inreg %{{.+}}, i31 inreg %{{.+}})
-// R600: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
 // ARC: define{{.*}} void @ParamPassing3(i15 inreg signext %{{.+}}, i31 inreg signext %{{.+}})
 // XCORE: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
 // RISCV64: define{{.*}} void @ParamPassing3(i15 signext %{{.+}}, i31 signext %{{.+}})
@@ -143,7 +139,6 @@ void ParamPassing4(_BitInt(129) a) {}
 // SPIR-NOT: define{{.*}} spir_func void @ParamPassing4(ptr byval(i129) align 8 %{{.+}})
 // HEX-NOT: define{{.*}} void @ParamPassing4(ptr byval(i129) align 8 %{{.+}})
 // LANAI-NOT: define{{.*}} void @ParamPassing4(ptr byval(i129) align 4 %{{.+}})
-// R600-NOT: define{{.*}} void @ParamPassing4(ptr addrspace(5) byval(i129) align 8 %{{.+}})
 // ARC-NOT: define{{.*}} void @ParamPassing4(ptr byval(i129) align 4 %{{.+}})
 // XCORE-NOT: define{{.*}} void @ParamPassing4(ptr byval(i129) align 4 %{{.+}})
 // RISCV64-NOT: define{{.*}} void @ParamPassing4(ptr %{{.+}})
@@ -173,7 +168,6 @@ _BitInt(63) ReturnPassing(void) { return 0; }
 // SPIR: define{{.*}} spir_func i63 @ReturnPassing(
 // HEX: define{{.*}} i63 @ReturnPassing(
 // LANAI: define{{.*}} i63 @ReturnPassing(
-// R600: define{{.*}} i63 @ReturnPassing(
 // ARC: define{{.*}} i63 @ReturnPassing(
 // XCORE: define{{.*}} i63 @ReturnPassing(
 // RISCV64: define{{.*}} signext i63 @ReturnPassing(
@@ -203,7 +197,6 @@ _BitInt(64) ReturnPassing2(void) { return 0; }
 // SPIR: define{{.*}} spir_func i64 @ReturnPassing2(
 // HEX: define{{.*}} i64 @ReturnPassing2(
 // LANAI: define{{.*}} i64 @ReturnPassing2(
-// R600: define{{.*}} i64 @ReturnPassing2(
 // ARC: define{{.*}} i64 @ReturnPassing2(
 // XCORE: define{{.*}} i64 @ReturnPassing2(
 // RISCV64: define{{.*}} i64 @ReturnPassing2(
@@ -235,7 +228,6 @@ _BitInt(127) ReturnPassing3(void) { return 0; }
 // SPIR: define{{.*}} spir_func void @ReturnPassing3(ptr dead_on_unwind noalias writable sret
 // HEX: define{{.*}} void @ReturnPassing3(ptr dead_on_unwind noalias writable sret
 // LANAI: define{{.*}} void @ReturnPassing3(ptr dead_on_unwind noalias writable sret
-// R600: define{{.*}} void @ReturnPassing3(ptr addrspace(5) dead_on_unwind noalias writable sret
 // ARC: define{{.*}} void @ReturnPassing3(ptr dead_on_unwind noalias writable sret
 // XCORE: define{{.*}} void @ReturnPassing3(ptr dead_on_unwind noalias writable sret
 // RISCV64: define{{.*}} i127 @ReturnPassing3(
@@ -265,7 +257,6 @@ _BitInt(128) ReturnPassing4(void) { return 0; }
 // SPIR: define{{.*}} spir_func void @ReturnPassing4(ptr dead_on_unwind noalias writable sret
 // HEX: define{{.*}} void @ReturnPassing4(ptr dead_on_unwind noalias writable sret
 // LANAI: define{{.*}} void @ReturnPassing4(ptr dead_on_unwind noalias writable sret
-// R600: define{{.*}} void @ReturnPassing4(ptr addrspace(5) dead_on_unwind noalias writable sret
 // ARC: define{{.*}} void @ReturnPassing4(ptr dead_on_unwind noalias writable sret
 // XCORE: define{{.*}} void @ReturnPassing4(ptr dead_on_unwind noalias writable sret
 // RISCV64: define{{.*}} i128 @ReturnPassing4(
@@ -297,7 +288,6 @@ _BitInt(129) ReturnPassing5(void) { return 0; }
 // SPIR-NOT: define{{.*}} spir_func void @ReturnPassing5(ptr dead_on_unwind noalias writable sret
 // HEX-NOT: define{{.*}} void @ReturnPassing5(ptr dead_on_unwind noalias writable sret
 // LANAI-NOT: define{{.*}} void @ReturnPassing5(ptr dead_on_unwind noalias writable sret
-// R600-NOT: define{{.*}} void @ReturnPassing5(ptr addrspace(5) noalias sret
 // ARC-NOT: define{{.*}} void @ReturnPassing5(ptr dead_on_unwind inreg noalias writable sret
 // XCORE-NOT: define{{.*}} void @ReturnPassing5(ptr dead_on_unwind noalias writable sret
 // WASM-NOT: define{{.*}} void @ReturnPassing5(ptr dead_on_unwind noalias writable sret
diff --git a/clang/test/CodeGen/target-data.c b/clang/test/CodeGen/target-data.c
index 52c2baf7d0a281..36f664c2f1b7ee 100644
--- a/clang/test/CodeGen/target-data.c
+++ b/clang/test/CodeGen/target-data.c
@@ -158,22 +158,14 @@
 // RUN: -emit-llvm %s | FileCheck %s -check-prefix=NVPTX64-SHORTPTR
 // NVPTX64-SHORTPTR: target datalayout = "e-p3:32:32-p4:32:32-p5:32:32-p6:32:32-p7:32:32-p101:32:32-i64:64-i128:128-i256:256-v16:16-v32:32-n16:32:64"
 
-// RUN: %clang_cc1 -triple r600-unknown -o - -emit-llvm %s | \
-// RUN: FileCheck %s -check-prefix=R600
-// R600: target datalayout = "e-m:e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"
-
-// RUN: %clang_cc1 -triple r600-unknown -target-cpu cayman -o - -emit-llvm %s \
-// RUN: | FileCheck %s -check-prefix=R600D
-// R600D: target datalayout = "e-m:e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1"
-
 // RUN: %clang_cc1 -triple amdgpu7.01-unknown -o - -emit-llvm %s \
-// RUN: | FileCheck %s -check-prefix=R600SI
-// R600SI: target datalayout = "e-m:e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-p10:32:32-p11:32:32-p13:32:32-p14:32:32-p15:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9"
+// RUN: | FileCheck %s -check-prefix=GFX701
+// GFX701: target datalayout = "e-m:e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-p10:32:32-p11:32:32-p13:32:32-p14:32:32-p15:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9"
 
 // Test default -target-cpu
 // RUN: %clang_cc1 -triple amdgpu-unknown -o - -emit-llvm %s \
-// RUN: | FileCheck %s -check-prefix=R600SIDefault
-// R600SIDefault: target datalayout = "e-m:e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-p10:32:32-p11:32:32-p13:32:32-p14:32:32-p15:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9"
+// RUN: | FileCheck %s -check-prefix=GFXDefault
+// GFXDefault: target datalayout = "e-m:e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-p10:32:32-p11:32:32-p13:32:32-p14:32:32-p15:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9"
 
 // RUN: %clang_cc1 -triple arm64-unknown -o - -emit-llvm %s | \
 // RUN: FileCheck %s -check-prefix=AARCH64
diff --git a/clang/test/CodeGenOpenCL/address-spaces.cl b/clang/test/CodeGenOpenCL/address-spaces.cl
index de03abbad6535e..0b5982177ca5fc 100644
--- a/clang/test/CodeGenOpenCL/address-spaces.cl
+++ b/clang/test/CodeGenOpenCL/address-spaces.cl
@@ -8,8 +8,6 @@
 // RUN: %clang_cc1 %s -O0 -triple amdgpu-amd-amdhsa -DCL20 -cl-std=CL3.0 -emit-llvm -o - -Wno-deprecated-attributes | FileCheck %s --check-prefixes=CL20,CL20AMDGCN
 // RUN: %clang_cc1 %s -O0 -triple amdgpu-mesa-mesa3d -emit-llvm -o - -Wno-deprecated-attributes | FileCheck --check-prefixes=CHECK,AMDGCN %s
 // RUN: %clang_cc1 %s -O0 -triple amdgpu-mesa-mesa3d -cl-std=CL3.0 -emit-llvm -o - -Wno-deprecated-attributes | FileCheck --check-prefixes=CHECK,AMDGCN %s
-// RUN: %clang_cc1 %s -O0 -triple r600-- -emit-llvm -o - -Wno-deprecated-attributes | FileCheck --check-prefixes=CHECK,AMDGCN %s
-// RUN: %clang_cc1 %s -O0 -triple r600-- -emit-llvm -cl-std=CL3.0 -o - -Wno-deprecated-attributes | FileCheck --check-prefixes=CHECK,AMDGCN %s
 
 // SPIR: %struct.S = type { i32, i32, ptr }
 // CL20SPIR: %struct.S = type { i32, i32, ptr addrspace(4) }
diff --git a/clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl b/clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
index c153fbf1a7d52a..04c4b7954c651d 100644
--- a/clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
+++ b/clang/test/CodeGenOpenCL/amdgpu-abi-struct-coerce.cl
@@ -1,6 +1,5 @@
 // REQUIRES: amdgpu-registered-target
 // RUN: %clang_cc1 -triple amdgpu-unknown-unknown -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple r600-unknown-unknown -emit-llvm -o - %s | FileCheck %s
 
 typedef __attribute__(( ext_vector_type(2) )) char char2;
 typedef __attribute__(( ext_vector_type(3) )) char char3;
diff --git a/clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl b/clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl
index 6574ec34b51f68..71f820100709b4 100644
--- a/clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl
+++ b/clang/test/CodeGenOpenCL/amdgpu-sizeof-alignof.cl
@@ -1,5 +1,3 @@
-// RUN: %clang_cc1 -triple r600 -cl-std=CL1.2 %s -emit-llvm -o - | FileCheck %s
-// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple r600 -cl-std=CL1.2 %s -emit-llvm -o - | FileCheck %s %}
 // RUN: %clang_cc1 -triple amdgpu-mesa-mesa3d -cl-std=CL1.2 %s -emit-llvm -o - | FileCheck %s
 // RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple amdgpu-mesa-mesa3d -cl-std=CL1.2 %s -emit-llvm -o - | FileCheck %s %}
 // RUN: %clang_cc1 -triple amdgpu-amd-amdhsa -cl-std=CL1.2 %s -emit-llvm -o - | FileCheck %s
@@ -7,8 +5,6 @@
 // RUN: %clang_cc1 -triple amdgpu-amd-amdhsa -cl-std=CL2.0 %s -emit-llvm -o - | FileCheck %s
 // RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple amdgpu-amd-amdhsa -cl-std=CL2.0 %s -emit-llvm -o - | FileCheck %s %}
 
-// RUN: %clang_cc1 -triple r600 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s
-// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple r600 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s %}
 // RUN: %clang_cc1 -triple amdgpu-mesa-mesa3d -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s
 // RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple amdgpu-mesa-mesa3d -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s %}
 // RUN: %clang_cc1 -triple amdgpu-amd-amdhsa -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s
@@ -19,8 +15,6 @@
 // RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple amdgpu-amd-amdhsa -cl-ext=+__opencl_c_generic_address_space -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s %}
 // RUN: %clang_cc1 -triple amdgpu-amd-amdpal -cl-ext=+__opencl_c_generic_address_space -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s
 // RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple amdgpu-amd-amdpal -cl-ext=+__opencl_c_generic_address_space -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s %}
-// RUN: %clang_cc1 -triple r600 -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s
-// RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple r600 -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s %}
 // RUN: %clang_cc1 -triple amdgpu-mesa-mesa3d -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s
 // RUN: %if cir-enabled %{ %clang_cc1 -fclangir -triple amdgpu-mesa-mesa3d -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s %}
 // RUN: %clang_cc1 -triple amdgpu-amd-amdhsa -cl-ext=+cl_khr_fp64,+__opencl_c_fp64 -cl-std=CL3.0 %s -emit-llvm -o - | FileCheck %s
diff --git a/clang/test/CodeGenOpenCL/builtins-r600.cl b/clang/test/CodeGenOpenCL/builtins-r600.cl
deleted file mode 100644
index 5fe130f585688f..00000000000000
--- a/clang/test/CodeGenOpenCL/builtins-r600.cl
+++ /dev/null
@@ -1,57 +0,0 @@
-// REQUIRES: amdgpu-registered-target
-// RUN: %clang_cc1 -triple r600-unknown-unknown -target-cpu cypress -emit-llvm -o - %s | FileCheck %s
-
-// CHECK-LABEL: @test_recipsqrt_ieee_f32
-// CHECK: call float @llvm.r600.recipsqrt.ieee.f32
-void test_recipsqrt_ieee_f32(global float* out, float a)
-{
-  *out = __builtin_r600_recipsqrt_ieeef(a);
-}
-
-#if cl_khr_fp64
-// XCHECK-LABEL: @test_recipsqrt_ieee_f64
-// XCHECK: call double @llvm.r600.recipsqrt.ieee.f64
-void test_recipsqrt_ieee_f64(global double* out, double a)
-{
-  *out = __builtin_r600_recipsqrt_ieee(a);
-}
-#endif
-
-// CHECK-LABEL: @test_implicitarg_ptr
-// CHECK: call ptr addrspace(7) @llvm.r600.implicitarg.ptr()
-void test_implicitarg_ptr(__attribute__((address_space(7))) unsigned char ** out)
-{
-  *out = __builtin_r600_implicitarg_ptr();
-}
-
-// CHECK-LABEL: @test_get_group_id(
-// CHECK: tail call i32 @llvm.r600.read.tgid.x()
-// CHECK: tail call i32 @llvm.r600.read.tgid.y()
-// CHECK: tail call i32 @llvm.r600.read.tgid.z()
-void test_get_group_id(int d, global int *out)
-{
-	switch (d) {
-	case 0: *out = __builtin_r600_read_tgid_x(); break;
-	case 1: *out = __builtin_r600_read_tgid_y(); break;
-	case 2: *out = __builtin_r600_read_tgid_z(); break;
-	default: *out = 0;
-	}
-}
-
-// CHECK-LABEL: @test_get_local_id(
-// CHECK: tail call i32 @llvm.r600.read.tidig.x()
-// CHECK: tail call i32 @llvm.r600.read.tidig.y()
-// CHECK: tail call i32 @llvm.r600.read.tidig.z()
-void test_get_local_id(int d, global int *out)
-{
-	switch (d) {
-	case 0: *out = __builtin_r600_read_tidig_x(); break;
-	case 1: *out = __builtin_r600_read_tidig_y(); break;
-	case 2: *out = __builtin_r600_read_tidig_z(); break;
-	default: *out = 0;
-	}
-}
-
-// CHECK: declare noundef range(i32 0, 1024) i32 @llvm.r600.read.tidig.x()
-// CHECK: declare noundef range(i32 0, 1024) i32 @llvm.r600.read.tidig.y()
-// CHECK: declare noundef range(i32 0, 1024) i32 @llvm.r600.read.tidig.z()
diff --git a/clang/test/CodeGenOpenCL/fpmath.cl b/clang/test/CodeGenOpenCL/fpmath.cl
index 5915496b3963da..1e622ffd4e146d 100644
--- a/clang/test/CodeGenOpenCL/fpmath.cl
+++ b/clang/test/CodeGenOpenCL/fpmath.cl
@@ -1,6 +1,5 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple spir-unknown-unknown | FileCheck --check-prefix=CHECK --check-prefix=NODIVOPT %s
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple spir-unknown-unknown -cl-fp32-correctly-rounded-divide-sqrt | FileCheck --check-prefix=CHECK --check-prefix=DIVOPT %s
-// RUN: %clang_cc1 %s -emit-llvm -o - -DNOFP16 -DNOFP64 -cl-std=CL1.2 -triple r600-unknown-unknown -target-cpu r600 -pedantic | FileCheck --check-prefix=CHECK-FLT %s
 // RUN: %clang_cc1 %s -emit-llvm -o - -DFP64 -cl-std=CL1.2 -triple spir-unknown-unknown -pedantic | FileCheck --check-prefix=CHECK-DBL %s
 
 #ifndef NOFP16
@@ -81,7 +80,6 @@ float4 elementwise_sqrt_v4f32(float4 a) {
 
 #if __OPENCL_C_VERSION__ >=120
 void printf(constant char* fmt, ...);
-
 void testdbllit(long *val) {
   // CHECK-FLT: float noundef 2.000000e+01
   // CHECK-DBL: double noundef 2.000000e+01
diff --git a/clang/test/Driver/amdgpu-macros.cl b/clang/test/Driver/amdgpu-macros.cl
index db6cfcc76044b7..b91106d3cf83fe 100644
--- a/clang/test/Driver/amdgpu-macros.cl
+++ b/clang/test/Driver/amdgpu-macros.cl
@@ -1,67 +1,6 @@
 // Check that appropriate macros are defined for every supported AMDGPU
 // "-target" and "-mcpu" options.
 
-//
-// R600-based processors.
-//
-
-// RUN: %clang -E -dM -target r600 -mcpu=r600 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,R600 %s -DCPU=r600
-// RUN: %clang -E -dM -target r600 -mcpu=rv630 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,R600 %s -DCPU=r600
-// RUN: %clang -E -dM -target r600 -mcpu=rv635 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,R600 %s -DCPU=r600
-// RUN: %clang -E -dM -target r600 -mcpu=r630 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,R630 %s -DCPU=r630
-// RUN: %clang -E -dM -target r600 -mcpu=rs780 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,RS880 %s -DCPU=rs880
-// RUN: %clang -E -dM -target r600 -mcpu=rs880 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,RS880 %s -DCPU=rs880
-// RUN: %clang -E -dM -target r600 -mcpu=rv610 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,RS880 %s -DCPU=rs880
-// RUN: %clang -E -dM -target r600 -mcpu=rv620 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,RS880 %s -DCPU=rs880
-// RUN: %clang -E -dM -target r600 -mcpu=rv670 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,RV670 %s -DCPU=rv670
-// RUN: %clang -E -dM -target r600 -mcpu=rv710 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,RV710 %s -DCPU=rv710
-// RUN: %clang -E -dM -target r600 -mcpu=rv730 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,RV730 %s -DCPU=rv730
-// RUN: %clang -E -dM -target r600 -mcpu=rv740 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,RV770 %s -DCPU=rv770
-// RUN: %clang -E -dM -target r600 -mcpu=rv770 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,RV770 %s -DCPU=rv770
-// RUN: %clang -E -dM -target r600 -mcpu=cedar %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,CEDAR %s -DCPU=cedar
-// RUN: %clang -E -dM -target r600 -mcpu=palm %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,CEDAR %s -DCPU=cedar
-// RUN: %clang -E -dM -target r600 -mcpu=cypress %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,CYPRESS %s -DCPU=cypress
-// RUN: %clang -E -dM -target r600 -mcpu=hemlock %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,CYPRESS %s -DCPU=cypress
-// RUN: %clang -E -dM -target r600 -mcpu=juniper %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,JUNIPER %s -DCPU=juniper
-// RUN: %clang -E -dM -target r600 -mcpu=redwood %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,REDWOOD %s -DCPU=redwood
-// RUN: %clang -E -dM -target r600 -mcpu=sumo %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,SUMO %s -DCPU=sumo
-// RUN: %clang -E -dM -target r600 -mcpu=sumo2 %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,SUMO %s -DCPU=sumo
-// RUN: %clang -E -dM -target r600 -mcpu=barts %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,BARTS %s -DCPU=barts
-// RUN: %clang -E -dM -target r600 -mcpu=caicos %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,CAICOS %s -DCPU=caicos
-// RUN: %clang -E -dM -target r600 -mcpu=aruba %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,CAYMAN %s -DCPU=cayman
-// RUN: %clang -E -dM -target r600 -mcpu=cayman %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,CAYMAN %s -DCPU=cayman
-// RUN: %clang -E -dM -target r600 -mcpu=turks %s 2>&1 | FileCheck --check-prefixes=ARCH-R600,TURKS %s -DCPU=turks
-
-// ARCH-R600-NOT:    #define FP_FAST_FMA 1
-// ARCH-R600-NOT:    #define FP_FAST_FMAF 1
-
-// ARCH-R600-DAG: #define __AMDGPU__ 1
-// ARCH-R600-DAG: #define __AMD__ 1
-
-// R600-NOT:    #define __HAS_FMAF__ 1
-// R630-NOT:    #define __HAS_FMAF__ 1
-// RS880-NOT:   #define __HAS_FMAF__ 1
-// RV670-NOT:   #define __HAS_FMAF__ 1
-// RV710-NOT:   #define __HAS_FMAF__ 1
-// RV730-NOT:   #define __HAS_FMAF__ 1
-// RV770-NOT:   #define __HAS_FMAF__ 1
-// CEDAR-NOT:   #define __HAS_FMAF__ 1
-// CYPRESS-DAG: #define __HAS_FMAF__ 1
-// JUNIPER-NOT: #define __HAS_FMAF__ 1
-// REDWOOD-NOT: #define __HAS_FMAF__ 1
-// SUMO-NOT:    #define __HAS_FMAF__ 1
-// BARTS-NOT:   #define __HAS_FMAF__ 1
-// CAICOS-NOT:  #define __HAS_FMAF__ 1
-// CAYMAN-DAG:  #define __HAS_FMAF__ 1
-// TURKS-NOT:   #define __HAS_FMAF__ 1
-
-// ARCH-R600-NOT:    #define __HAS_FP64__ 1
-// ARCH-R600-NOT:    #define __HAS_LDEXPF__ 1
-
-// ARCH-R600-DAG: #define __R600__ 1
-
-// ARCH-R600-DAG:    #define __[[CPU]]__ 1
-
 //
 // AMDGCN-based processors.
 //
diff --git a/clang/test/Driver/amdgpu-mcpu.cl b/clang/test/Driver/amdgpu-mcpu.cl
index 5fb0b4418ab44d..2cbe42eed67e84 100644
--- a/clang/test/Driver/amdgpu-mcpu.cl
+++ b/clang/test/Driver/amdgpu-mcpu.cl
@@ -1,53 +1,5 @@
 // Check that -mcpu works for all supported GPUs.
 
-//
-// R600-based processors.
-//
-
-// RUN: %clang -### -target r600 -mcpu=r600 %s 2>&1 | FileCheck --check-prefix=R600 %s
-// RUN: %clang -### -target r600 -mcpu=rv630 %s 2>&1 | FileCheck --check-prefix=R600 %s
-// RUN: %clang -### -target r600 -mcpu=rv635 %s 2>&1 | FileCheck --check-prefix=R600 %s
-// RUN: %clang -### -target r600 -mcpu=r630 %s 2>&1 | FileCheck --check-prefix=R630 %s
-// RUN: %clang -### -target r600 -mcpu=rs780 %s 2>&1 | FileCheck --check-prefix=RS880 %s
-// RUN: %clang -### -target r600 -mcpu=rs880 %s 2>&1 | FileCheck --check-prefix=RS880 %s
-// RUN: %clang -### -target r600 -mcpu=rv610 %s 2>&1 | FileCheck --check-prefix=RS880 %s
-// RUN: %clang -### -target r600 -mcpu=rv620 %s 2>&1 | FileCheck --check-prefix=RS880 %s
-// RUN: %clang -### -target r600 -mcpu=rv670 %s 2>&1 | FileCheck --check-prefix=RV670 %s
-// RUN: %clang -### -target r600 -mcpu=rv710 %s 2>&1 | FileCheck --check-prefix=RV710 %s
-// RUN: %clang -### -target r600 -mcpu=rv730 %s 2>&1 | FileCheck --check-prefix=RV730 %s
-// RUN: %clang -### -target r600 -mcpu=rv740 %s 2>&1 | FileCheck --check-prefix=RV770 %s
-// RUN: %clang -### -target r600 -mcpu=rv770 %s 2>&1 | FileCheck --check-prefix=RV770 %s
-// RUN: %clang -### -target r600 -mcpu=cedar %s 2>&1 | FileCheck --check-prefix=CEDAR %s
-// RUN: %clang -### -target r600 -mcpu=palm %s 2>&1 | FileCheck --check-prefix=CEDAR %s
-// RUN: %clang -### -target r600 -mcpu=cypress %s 2>&1 | FileCheck --check-prefix=CYPRESS %s
-// RUN: %clang -### -target r600 -mcpu=hemlock %s 2>&1 | FileCheck --check-prefix=CYPRESS %s
-// RUN: %clang -### -target r600 -mcpu=juniper %s 2>&1 | FileCheck --check-prefix=JUNIPER %s
-// RUN: %clang -### -target r600 -mcpu=redwood %s 2>&1 | FileCheck --check-prefix=REDWOOD %s
-// RUN: %clang -### -target r600 -mcpu=sumo %s 2>&1 | FileCheck --check-prefix=SUMO %s
-// RUN: %clang -### -target r600 -mcpu=sumo2 %s 2>&1 | FileCheck --check-prefix=SUMO %s
-// RUN: %clang -### -target r600 -mcpu=barts %s 2>&1 | FileCheck --check-prefix=BARTS %s
-// RUN: %clang -### -target r600 -mcpu=caicos %s 2>&1 | FileCheck --check-prefix=CAICOS %s
-// RUN: %clang -### -target r600 -mcpu=aruba %s 2>&1 | FileCheck --check-prefix=CAYMAN %s
-// RUN: %clang -### -target r600 -mcpu=cayman %s 2>&1 | FileCheck --check-prefix=CAYMAN %s
-// RUN: %clang -### -target r600 -mcpu=turks %s 2>&1 | FileCheck --check-prefix=TURKS %s
-
-// R600:    "-target-cpu" "r600"
-// R630:    "-target-cpu" "r630"
-// RS880:   "-target-cpu" "rs880"
-// RV670:   "-target-cpu" "rv670"
-// RV710:   "-target-cpu" "rv710"
-// RV730:   "-target-cpu" "rv730"
-// RV770:   "-target-cpu" "rv770"
-// CEDAR:   "-target-cpu" "cedar"
-// CYPRESS: "-target-cpu" "cypress"
-// JUNIPER: "-target-cpu" "juniper"
-// REDWOOD: "-target-cpu" "redwood"
-// SUMO:    "-target-cpu" "sumo"
-// BARTS:   "-target-cpu" "barts"
-// CAICOS:  "-target-cpu" "caicos"
-// CAYMAN:  "-target-cpu" "cayman"
-// TURKS:   "-target-cpu" "turks"
-
 //
 // AMDGCN-based processors.
 //
diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c
index 3da3bcfa7a0e29..32f212d6dcfbc3 100644
--- a/clang/test/Driver/fsanitize.c
+++ b/clang/test/Driver/fsanitize.c
@@ -78,8 +78,6 @@
 // RUN: not %clang --target=hexagon-unknown-none-elf -fsanitize=concurrency %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANC-HEXAGON-BAREMETAL
 // CHECK-SANC-HEXAGON-BAREMETAL: unsupported option '-fsanitize=concurrency'
 
-// RUN: not %clang --target=r600 -mcpu=cypress -nogpulib -fsanitize=concurrency %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANC-R600
-// CHECK-SANC-R600: unsupported option '-fsanitize=concurrency' for target 'r600'
 // RUN: not %clang --target=amdgpu-amd-amdpal -mcpu=gfx900 -nogpulib -fsanitize=concurrency %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANC-PAL
 // CHECK-SANC-PAL: unsupported option '-fsanitize=concurrency' for target 'amdgpu-amd-amdpal'
 // RUN: not %clang --target=amdgpu-mesa-mesa3d -mcpu=gfx900 -nogpulib -fsanitize=concurrency %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANC-MESA
diff --git a/clang/test/Misc/r600.languageOptsOpenCL.cl b/clang/test/Misc/r600.languageOptsOpenCL.cl
deleted file mode 100644
index 27a7691d535757..00000000000000
--- a/clang/test/Misc/r600.languageOptsOpenCL.cl
+++ /dev/null
@@ -1,153 +0,0 @@
-// REQUIRES: amdgpu-registered-target
-// RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple r600-unknown-unknown -target-cpu cayman
-// RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple r600-unknown-unknown -target-cpu cayman
-// RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple r600-unknown-unknown -target-cpu cayman
-// RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu cayman
-// RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu cayman
-// RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu cayman
-// RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple r600-unknown-unknown -target-cpu cypress
-// RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple r600-unknown-unknown -target-cpu cypress
-// RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple r600-unknown-unknown -target-cpu cypress
-// RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu cypress
-// RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu cypress
-// RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu cypress
-// RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple r600-unknown-unknown -target-cpu turks
-// RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple r600-unknown-unknown -target-cpu turks
-// RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple r600-unknown-unknown -target-cpu turks
-// RUN: %clang_cc1 -x cl -cl-std=CL %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu turks
-// RUN: %clang_cc1 -x cl -cl-std=CL1.1 %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu turks
-// RUN: %clang_cc1 -x cl -cl-std=CL1.2 %s -verify -triple r600-unknown-unknown -Wpedantic-core-features -DTEST_CORE_FEATURES -target-cpu turks
-
-// Extensions in all versions
-#ifndef cl_clang_storage_class_specifiers
-#error "Missing cl_clang_storage_class_specifiers define"
-#endif
-#pragma OPENCL EXTENSION cl_clang_storage_class_specifiers : enable
-
-#ifndef __cl_clang_function_pointers
-#error "Missing __cl_clang_function_pointers define"
-#endif
-#pragma OPENCL EXTENSION __cl_clang_function_pointers : enable
-
-#ifndef __cl_clang_variadic_functions
-#error "Missing __cl_clang_variadic_functions define"
-#endif
-#pragma OPENCL EXTENSION __cl_clang_variadic_functions : enable
-
-#ifndef __cl_clang_non_portable_kernel_param_types
-#error "Missing __cl_clang_non_portable_kernel_param_types define"
-#endif
-#pragma OPENCL EXTENSION __cl_clang_non_portable_kernel_param_types : enable
-
-#ifndef __cl_clang_bitfields
-#error "Missing __cl_clang_bitfields define"
-#endif
-#pragma OPENCL EXTENSION __cl_clang_bitfields : enable
-
-#ifdef cl_khr_fp16
-#error "Incorrect cl_khr_fp16 define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_fp16: enable
-// expected-warning at -1{{unsupported OpenCL extension 'cl_khr_fp16' - ignoring}}
-
-#ifdef cl_khr_int64_base_atomics
-#error "Incorrect cl_khr_int64_base_atomics define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_int64_base_atomics: enable
-// expected-warning at -1{{unsupported OpenCL extension 'cl_khr_int64_base_atomics' - ignoring}}
-
-#ifdef cl_khr_int64_extended_atomics
-#error "Incorrect cl_khr_int64_extended_atomics define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_int64_extended_atomics: enable
-// expected-warning at -1{{unsupported OpenCL extension 'cl_khr_int64_extended_atomics' - ignoring}}
-
-// Core features in CL 1.1
-
-#ifndef cl_khr_byte_addressable_store
-#error "Missing cl_khr_byte_addressable_store define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_byte_addressable_store: enable
-#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES
-// expected-warning at -2{{OpenCL extension 'cl_khr_byte_addressable_store' is core feature or supported optional core feature - ignoring}}
-#endif
-
-#ifndef cl_khr_global_int32_base_atomics
-#error "Missing cl_khr_global_int32_base_atomics define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_global_int32_base_atomics: enable
-#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES
-// expected-warning at -2{{OpenCL extension 'cl_khr_global_int32_base_atomics' is core feature or supported optional core feature - ignoring}}
-#endif
-
-#ifndef cl_khr_global_int32_extended_atomics
-#error "Missing cl_khr_global_int32_extended_atomics define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics: enable
-#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES
-// expected-warning at -2{{OpenCL extension 'cl_khr_global_int32_extended_atomics' is core feature or supported optional core feature - ignoring}}
-#endif
-
-#ifndef cl_khr_local_int32_base_atomics
-#error "Missing cl_khr_local_int32_base_atomics define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_local_int32_base_atomics: enable
-#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES
-// expected-warning at -2{{OpenCL extension 'cl_khr_local_int32_base_atomics' is core feature or supported optional core feature - ignoring}}
-#endif
-
-#ifndef cl_khr_local_int32_extended_atomics
-#error "Missing cl_khr_local_int32_extended_atomics define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics: enable
-#if (__OPENCL_C_VERSION__ >= 110) && defined TEST_CORE_FEATURES
-// expected-warning at -2{{OpenCL extension 'cl_khr_local_int32_extended_atomics' is core feature or supported optional core feature - ignoring}}
-#endif
-
-// Core feature in CL 1.2
-#ifdef __HAS_FP64__
-#ifndef cl_khr_fp64
-#error "Missing cl_khr_fp64 define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_fp64: enable
-#if (__OPENCL_C_VERSION__ >= 120) && defined TEST_CORE_FEATURES
-// expected-warning at -2{{OpenCL extension 'cl_khr_fp64' is core feature or supported optional core feature - ignoring}}
-#endif
-#else
-#ifdef cl_khr_fp64
-#error "Incorrect cl_khr_fp64 define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_fp64: enable
-// expected-warning at -1{{unsupported OpenCL extension 'cl_khr_fp64' - ignoring}}
-#endif // __HAS_FP64__
-
-//Core feature in CL 2.0
-#ifdef cl_khr_3d_image_writes
-#error "Incorrect cl_khr_3d_image_writes define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_3d_image_writes: enable
-// expected-warning at -1{{unsupported OpenCL extension 'cl_khr_3d_image_writes' - ignoring}}
-
-#ifdef cl_khr_gl_msaa_sharing
-#error "Incorrect cl_khr_gl_msaa_sharing define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing: enable
-// expected-warning at -1{{unsupported OpenCL extension 'cl_khr_gl_msaa_sharing' - ignoring}}
-
-#ifdef cl_khr_srgb_image_writes
-#error "Incorrect cl_khr_srgb_image_writes define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_srgb_image_writes: enable
-// expected-warning at -1{{unsupported OpenCL extension 'cl_khr_srgb_image_writes' - ignoring}}
-
-#ifdef cl_khr_subgroups
-#error "Incorrect cl_khr_subgroups define"
-#endif
-#pragma OPENCL EXTENSION cl_khr_subgroups: enable
-// expected-warning at -1{{unsupported OpenCL extension 'cl_khr_subgroups' - ignoring}}
-
-#ifdef __opencl_c_generic_address_space
-#error "Incorrect __opencl_c_generic_address_space define"
-#endif
-#pragma OPENCL EXTENSION __opencl_c_generic_address_space: enable
-// expected-warning at -1{{OpenCL extension '__opencl_c_generic_address_space' unknown or does not require pragma - ignoring}}
diff --git a/clang/test/Misc/r600.unsupported_core.cl b/clang/test/Misc/r600.unsupported_core.cl
deleted file mode 100644
index db3d74880d8b1f..00000000000000
--- a/clang/test/Misc/r600.unsupported_core.cl
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %clang_cc1 -cl-std=CL2.0 -triple r600-unknown-unknown -Wpedantic-core-features %s 2> %t
-// RUN: FileCheck < %t %s
-
-// CHECK: cl_khr_byte_addressable_store is a core feature in OpenCL C version 2.0 but not supported on this target
-// CHECK: cl_khr_global_int32_base_atomics is a core feature in OpenCL C version 2.0 but not supported on this target
-// CHECK: cl_khr_global_int32_extended_atomics is a core feature in OpenCL C version 2.0 but not supported on this target
-// CHECK: cl_khr_local_int32_base_atomics is a core feature in OpenCL C version 2.0 but not supported on this target
-// CHECK: cl_khr_local_int32_extended_atomics is a core feature in OpenCL C version 2.0 but not supported on this target
-// CHECK: cl_khr_3d_image_writes is a core feature in OpenCL C version 2.0 but not supported on this target
diff --git a/clang/test/Misc/target-invalid-cpu-note/r600.c b/clang/test/Misc/target-invalid-cpu-note/r600.c
deleted file mode 100644
index bc0d27e8324429..00000000000000
--- a/clang/test/Misc/target-invalid-cpu-note/r600.c
+++ /dev/null
@@ -1,34 +0,0 @@
-// This test uses '<prefix>-SAME: {{^}}' to start matching immediately where the
-// previous check finished matching (specifically, caret is not treated as
-// matching a start of line when used like this in FileCheck).
-
-// RUN: not %clang_cc1 -triple r600--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s
-// CHECK: error: unknown target CPU 'not-a-cpu'
-// CHECK-NEXT: note: valid target CPU values are:
-// CHECK-SAME: {{^}} r600
-// CHECK-SAME: {{^}}, r630
-// CHECK-SAME: {{^}}, rs880
-// CHECK-SAME: {{^}}, rv670
-// CHECK-SAME: {{^}}, rv710
-// CHECK-SAME: {{^}}, rv730
-// CHECK-SAME: {{^}}, rv770
-// CHECK-SAME: {{^}}, cedar
-// CHECK-SAME: {{^}}, cypress
-// CHECK-SAME: {{^}}, juniper
-// CHECK-SAME: {{^}}, redwood
-// CHECK-SAME: {{^}}, sumo
-// CHECK-SAME: {{^}}, barts
-// CHECK-SAME: {{^}}, caicos
-// CHECK-SAME: {{^}}, cayman
-// CHECK-SAME: {{^}}, turks
-// CHECK-SAME: {{^}}, rv630
-// CHECK-SAME: {{^}}, rv635
-// CHECK-SAME: {{^}}, rs780
-// CHECK-SAME: {{^}}, rv610
-// CHECK-SAME: {{^}}, rv620
-// CHECK-SAME: {{^}}, rv740
-// CHECK-SAME: {{^}}, palm
-// CHECK-SAME: {{^}}, hemlock
-// CHECK-SAME: {{^}}, sumo2
-// CHECK-SAME: {{^}}, aruba
-// CHECK-SAME: {{$}}
diff --git a/clang/test/Preprocessor/init-amdgpu.c b/clang/test/Preprocessor/init-amdgpu.c
index 9e938ab4502a51..3ff42c29cc7e35 100644
--- a/clang/test/Preprocessor/init-amdgpu.c
+++ b/clang/test/Preprocessor/init-amdgpu.c
@@ -10,11 +10,6 @@
 // RUN: %clang_cc1 -x c++ -E -dM -triple=amdgpu12.50-amd-amdhsa < /dev/null \
 // RUN:   | FileCheck -match-full-lines -check-prefix=LP64 %s
 //
-// r600 has 32-bit pointers and keeps the generic defaults.
-//
-// RUN: %clang_cc1 -E -dM -triple=r600 < /dev/null \
-// RUN:   | FileCheck -match-full-lines -check-prefix=LLP64 %s
-//
 // OpenCL mandates its own widths regardless of the target.
 //
 // RUN: %clang_cc1 -x cl -cl-std=CL2.0 -E -dM -triple=amdgpu9.0a-amd-amdhsa < /dev/null \
diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c
index 2d5f37c6831c04..e6dbf219942e68 100644
--- a/clang/test/Preprocessor/init.c
+++ b/clang/test/Preprocessor/init.c
@@ -998,7 +998,6 @@
 //
 
 // RUN: %clang_cc1 -x cl -E -dM -ffreestanding -triple=amdgpu < /dev/null | FileCheck -match-full-lines -check-prefix AMDGCN --check-prefix AMDGPU %s
-// RUN: %clang_cc1 -x cl -E -dM -ffreestanding -triple=r600 -target-cpu caicos < /dev/null | FileCheck -match-full-lines --check-prefix AMDGPU %s
 //
 // AMDGPU:#define __ENDIAN_LITTLE__ 1
 // AMDGPU:#define cl_khr_byte_addressable_store 1
diff --git a/clang/test/Preprocessor/predefined-arch-macros.c b/clang/test/Preprocessor/predefined-arch-macros.c
index b24af6d81758ad..29c18eae19ba91 100644
--- a/clang/test/Preprocessor/predefined-arch-macros.c
+++ b/clang/test/Preprocessor/predefined-arch-macros.c
@@ -5124,20 +5124,6 @@
 // CHECK_AMDGCN: #define __HAS_FP64__ 1
 // CHECK_AMDGCN: #define __HAS_LDEXPF__ 1
 
-// Begin r600 tests ----------------
-
-// RUN: %clang -E -dM %s -o - 2>&1 \
-// RUN:     -target r600-unknown-unknown \
-// RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_R600
-// CHECK_R600: #define __R600__ 1
-// CHECK_R600-NOT: #define __HAS_FMAF__ 1
-
-// RUN: %clang -mcpu=cypress -E -dM %s -o - 2>&1 \
-// RUN:     -target r600-unknown-unknown \
-// RUN:   | FileCheck -match-full-lines %s -check-prefix=CHECK_R600_FP64
-// CHECK_R600_FP64-DAG: #define __R600__ 1
-// CHECK_R600_FP64-DAG: #define __HAS_FMAF__ 1
-
 // Begin HIP host tests -----------
 
 // RUN: %clang -x hip -E -dM %s -o - 2>&1 --offload-host-only -nogpulib \
diff --git a/clang/test/Preprocessor/predefined-macros-no-warnings.c b/clang/test/Preprocessor/predefined-macros-no-warnings.c
index d478658d7dd0c9..375a3cda2820a7 100644
--- a/clang/test/Preprocessor/predefined-macros-no-warnings.c
+++ b/clang/test/Preprocessor/predefined-macros-no-warnings.c
@@ -98,7 +98,6 @@
 // RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple nvptx
 // RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple nvptx64
 // RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple amdgpu
-// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple r600
 // RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv32
 // RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv32-linux
 // RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv64
diff --git a/clang/test/Sema/attr-model.cpp b/clang/test/Sema/attr-model.cpp
index 885d7ee6795ef6..9ec577577b9fc5 100644
--- a/clang/test/Sema/attr-model.cpp
+++ b/clang/test/Sema/attr-model.cpp
@@ -6,7 +6,6 @@
 // RUN: %clang_cc1 -triple x86_64 -verify=x86_64 -fsyntax-only %s
 // RUN: %clang_cc1 -triple nvptx64-unknown-cuda -fcuda-is-device -x cuda -verify=ignored -fsyntax-only %s
 // RUN: %clang_cc1 -triple amdgpu -verify=ignored -fsyntax-only %s
-// RUN: %clang_cc1 -triple r600 -verify=ignored -fsyntax-only %s
 // RUN: %clang_cc1 -triple spirv-linux-vulkan-library -verify=ignored -fsyntax-only %s
 // RUN: %clang_cc1 -triple spirv32-unknown-unknown -verify=ignored -fsyntax-only %s
 // RUN: %clang_cc1 -triple spirv64-unknown-unknown -verify=ignored -fsyntax-only %s
@@ -58,7 +57,7 @@ void __attribute((model("extreme"))) h() {} // unsupported-warning {{unknown att
 
 #if !defined(__CUDA__) || !defined(__CUDA_ARCH__)
 // if we are compiling for non-cuda host, or host mode in a CUDA compile
-#if !defined(__AMDGCN__) && !defined(__R600__) && !defined(__SPIRV__)
+#if !defined(__AMDGCN__) && !defined(__SPIRV__)
 // for all non-cuda hosts, above targets don't support thread_local
 thread_local
 #endif
diff --git a/clang/test/SemaCUDA/amdgpu-bf16.cu b/clang/test/SemaCUDA/amdgpu-bf16.cu
deleted file mode 100644
index 0b5ce1a4f64cf5..00000000000000
--- a/clang/test/SemaCUDA/amdgpu-bf16.cu
+++ /dev/null
@@ -1,57 +0,0 @@
-// REQUIRES: amdgpu-registered-target
-// REQUIRES: x86-registered-target
-
-// RUN: %clang_cc1 "-aux-triple" "x86_64-unknown-linux-gnu" "-triple" "r600-unknown-unknown"\
-// RUN:    -fcuda-is-device "-aux-target-cpu" "x86-64" -fsyntax-only -verify=r600 %s
-
-// AMDGCN has storage-only support for bf16. R600 does not support it should error out when
-// it's the main target.
-
-#include "Inputs/cuda.h"
-
-// There should be no errors on using the type itself, or when loading/storing values for amdgcn.
-// r600 should error on all uses of the type.
-
-// r600-error at +1 {{__bf16 is not supported on this target}}
-typedef __attribute__((ext_vector_type(2))) __bf16 bf16_x2;
-// r600-error at +1 {{__bf16 is not supported on this target}}
-typedef __attribute__((ext_vector_type(4))) __bf16 bf16_x4;
-// r600-error at +1 {{__bf16 is not supported on this target}}
-typedef __attribute__((ext_vector_type(8))) __bf16 bf16_x8;
-// r600-error at +1 {{__bf16 is not supported on this target}}
-typedef __attribute__((ext_vector_type(16))) __bf16 bf16_x16;
-
-// r600-error at +1 2 {{__bf16 is not supported on this target}}
-__device__ void test(bool b, __bf16 *out, __bf16 in) {
-  __bf16 bf16 = in;  // r600-error {{__bf16 is not supported on this target}}
-  *out = bf16;
-
-  // r600-error at +1 {{__bf16 is not supported on this target}}
-  typedef __attribute__((ext_vector_type(2))) __bf16 bf16_x2;
-  bf16_x2 vec2_a, vec2_b;
-  vec2_a = vec2_b;
-
-  // r600-error at +1 {{__bf16 is not supported on this target}}
-  typedef __attribute__((ext_vector_type(4))) __bf16 bf16_x4;
-  bf16_x4 vec4_a, vec4_b;
-  vec4_a = vec4_b;
-
-  // r600-error at +1 {{__bf16 is not supported on this target}}
-  typedef __attribute__((ext_vector_type(8))) __bf16 bf16_x8;
-  bf16_x8 vec8_a, vec8_b;
-  vec8_a = vec8_b;
-
-  // r600-error at +1 {{__bf16 is not supported on this target}}
-  typedef __attribute__((ext_vector_type(16))) __bf16 bf16_x16;
-  bf16_x16 vec16_a, vec16_b;
-  vec16_a = vec16_b;
-}
-
-// r600-error at +1 2 {{__bf16 is not supported on this target}}
-__bf16 hostfn(__bf16 a) {
-  return a;
-}
-
-// r600-error at +2 {{__bf16 is not supported on this target}}
-// r600-error at +1 {{vector size not an integral multiple of component size}}
-typedef __bf16 foo __attribute__((__vector_size__(16), __aligned__(16)));
diff --git a/clang/test/SemaOpenCL/features.cl b/clang/test/SemaOpenCL/features.cl
index e95f94d56c8d94..717ac088b83c2c 100644
--- a/clang/test/SemaOpenCL/features.cl
+++ b/clang/test/SemaOpenCL/features.cl
@@ -2,18 +2,10 @@
 // RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES
 // RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 -cl-ext=+all \
 // RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES
-// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 \
-// RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES
-// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=CL3.0 -cl-ext=+all \
-// RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES
 // RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=clc++2021 -cl-ext=-all \
 // RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES
 // RUN: %clang_cc1 -triple spir-unknown-unknown %s -E -dM -o - -x cl -cl-std=clc++2021 -cl-ext=+all \
 // RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES
-// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=clc++2021 \
-// RUN:   | FileCheck -match-full-lines %s  --check-prefix=NO-FEATURES
-// RUN: %clang_cc1 -triple r600-unknown-unknown %s -E -dM -o - -x cl -cl-std=clc++2021 -cl-ext=+all \
-// RUN:   | FileCheck -match-full-lines %s  --check-prefix=FEATURES
 
 // For OpenCL C 2.0 feature macros, test that CL2.0 define them but earlier OpenCL
 // versions don't define feature macros accidentally.
diff --git a/clang/test/SemaOpenCL/fp64-fp16-options.cl b/clang/test/SemaOpenCL/fp64-fp16-options.cl
index deff4d462df103..0b43961b673c38 100644
--- a/clang/test/SemaOpenCL/fp64-fp16-options.cl
+++ b/clang/test/SemaOpenCL/fp64-fp16-options.cl
@@ -3,31 +3,14 @@
 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -fsyntax-only -cl-std=CL1.1 -DNOPEDANTIC
 // RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL1.2 -DFP64
 
-// Test with a target not supporting fp64.
-// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -DNOFP64 -DNOFP16
-// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -DNOFP64 -DNOFP16
-// RUN: %clang_cc1 -cl-std=CL3.1 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -DNOFP64 -DNOFP16
-// RUN: %clang_cc1 -cl-std=clc++2021 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -DNOFP64 -DNOFP16
 
 // Test with some extensions enabled or disabled by cmd-line args
 //
-// Target does not support fp64 and fp16 - override it
-// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+cl_khr_fp64,+cl_khr_fp16
-//
 // Disable or enable all extensions
 // RUN: %clang_cc1 %s -cl-std=CL1.0 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -DNOFP64 -DNOFP16
-// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all
-// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all,-cl_khr_fp64 -DNOFP64
-// RUN: %clang_cc1 %s -cl-std=CL1.0 -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=-all,+cl_khr_fp64 -DNOFP16
 // RUN: %clang_cc1 -cl-std=CL3.0 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -DNOFP64 -DNOFP16
-// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all -DFP64
-// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all,-__opencl_c_fp64,-cl_khr_fp64 -DNOFP64
 // RUN: %clang_cc1 -cl-std=CL3.1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -DNOFP64 -DNOFP16
-// RUN: %clang_cc1 -cl-std=CL3.1 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all -DFP64
-// RUN: %clang_cc1 -cl-std=CL3.1 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all,-__opencl_c_fp64,-cl_khr_fp64 -DNOFP64
 // RUN: %clang_cc1 -cl-std=clc++2021 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -DNOFP64 -DNOFP16
-// RUN: %clang_cc1 -cl-std=clc++2021 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all -DFP64
-// RUN: %clang_cc1 -cl-std=clc++2021 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all,-__opencl_c_fp64,-cl_khr_fp64 -DNOFP64
 //
 // Concatenating
 // RUN: %clang_cc1 %s -cl-std=CL1.0 -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-cl_khr_fp64 -cl-ext=+cl_khr_fp64
diff --git a/flang/test/Driver/target-cpu-features.f90 b/flang/test/Driver/target-cpu-features.f90
index ca9c6f7165d23d..d293ce76c83f88 100644
--- a/flang/test/Driver/target-cpu-features.f90
+++ b/flang/test/Driver/target-cpu-features.f90
@@ -35,9 +35,6 @@
 ! RUN: %flang --target=amdgcn-amd-amdhsa -mcpu=gfx908 -nogpulib -c %s -### 2>&1 \
 ! RUN: | FileCheck %s -check-prefix=CHECK-AMDGPU
 
-! RUN: %flang --target=r600-unknown-unknown -mcpu=cayman -nogpulib -c %s -### 2>&1 \
-! RUN: | FileCheck %s -check-prefix=CHECK-AMDGPU-R600
-
 ! RUN: %flang --target=loongarch64-linux-gnu -c %s -### 2>&1 \
 ! RUN: | FileCheck %s -check-prefix=CHECK-LOONGARCH64
 
@@ -82,9 +79,6 @@
 ! CHECK-AMDGPU: "-fc1" "-triple" "amdgpu9.08-amd-amdhsa"
 ! CHECK-AMDGPU-SAME: "-target-cpu" "gfx908"
 
-! CHECK-AMDGPU-R600: "-fc1" "-triple" "r600-unknown-unknown"
-! CHECK-AMDGPU-R600-SAME: "-target-cpu" "cayman"
-
 ! CHECK-LOONGARCH64: "-fc1" "-triple" "loongarch64-unknown-linux-gnu"
 ! CHECK-LOONGARCH64-SAME: "-target-cpu" "loongarch64" "-target-feature" "+lsx" "-target-feature" "+relax" "-target-feature" "+64bit" "-target-feature" "+f" "-target-feature" "+d" "-target-feature" "+ual"
 
diff --git a/lld/test/ELF/lto/r600.ll b/lld/test/ELF/lto/r600.ll
deleted file mode 100644
index 937c1bd201e5c4..00000000000000
--- a/lld/test/ELF/lto/r600.ll
+++ /dev/null
@@ -1,12 +0,0 @@
-; REQUIRES: amdgpu
-; RUN: llvm-as %s -o %t.o
-; RUN: ld.lld %t.o -o %t
-
-; Make sure the r600 triple is handled
-
-target triple = "r600-mesa-mesa3d"
-target datalayout = "e-m:e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5"
-
-define void @_start() {
-  ret void
-}

>From 318a5c480ac6846224c35a09b7e0dc45b1609e9e Mon Sep 17 00:00:00 2001
From: Harrison Hao <tsworld1314 at gmail.com>
Date: Tue, 24 Nov 2026 17:52:35 +0800
Subject: [PATCH 2/2] Update for comments

---
 clang/test/CodeGenOpenCL/fpmath.cl | 1 -
 1 file changed, 1 deletion(-)

diff --git a/clang/test/CodeGenOpenCL/fpmath.cl b/clang/test/CodeGenOpenCL/fpmath.cl
index 1e622ffd4e146d..fc7b5f384ae143 100644
--- a/clang/test/CodeGenOpenCL/fpmath.cl
+++ b/clang/test/CodeGenOpenCL/fpmath.cl
@@ -81,7 +81,6 @@ float4 elementwise_sqrt_v4f32(float4 a) {
 #if __OPENCL_C_VERSION__ >=120
 void printf(constant char* fmt, ...);
 void testdbllit(long *val) {
-  // CHECK-FLT: float noundef 2.000000e+01
   // CHECK-DBL: double noundef 2.000000e+01
   printf("%f", 20.0);
 }



More information about the cfe-commits mailing list