Skip to content

Commit 9d67dcd

Browse files
committed
Merge remote-tracking branch 'origin/main' into vplan-narrow-interleave
Conflicts: llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
2 parents d4cd3aa + 68ed172 commit 9d67dcd

File tree

96 files changed

+5418
-2796
lines changed

Some content is hidden

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

96 files changed

+5418
-2796
lines changed

clang/include/clang/Basic/arm_neon.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,3 +2126,9 @@ let ArchGuard = "defined(__aarch64__)", TargetGuard = "neon,faminmax" in {
21262126
def FAMIN : WInst<"vamin", "...", "fhQdQfQh">;
21272127
def FAMAX : WInst<"vamax", "...", "fhQdQfQh">;
21282128
}
2129+
2130+
let ArchGuard = "defined(__aarch64__)", TargetGuard = "fp8,neon" in {
2131+
// fscale
2132+
def FSCALE_V128 : WInst<"vscale", "..(.S)", "QdQfQh">;
2133+
def FSCALE_V64 : WInst<"vscale", "(.q)(.q)(.qS)", "fh">;
2134+
}

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13573,6 +13573,14 @@ Value *CodeGenFunction::EmitAArch64BuiltinExpr(unsigned BuiltinID,
1357313573
Int = Intrinsic::aarch64_neon_famax;
1357413574
return EmitNeonCall(CGM.getIntrinsic(Int, Ty), Ops, "famax");
1357513575
}
13576+
case NEON::BI__builtin_neon_vscale_f16:
13577+
case NEON::BI__builtin_neon_vscaleq_f16:
13578+
case NEON::BI__builtin_neon_vscale_f32:
13579+
case NEON::BI__builtin_neon_vscaleq_f32:
13580+
case NEON::BI__builtin_neon_vscaleq_f64: {
13581+
Int = Intrinsic::aarch64_neon_fp8_fscale;
13582+
return EmitNeonCall(CGM.getIntrinsic(Int, Ty), Ops, "fscale");
13583+
}
1357613584
}
1357713585
}
1357813586

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4
2+
// REQUIRES: aarch64-registered-target
3+
#include <arm_neon.h>
4+
5+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +fp8 -O3 -emit-llvm -o - %s | FileCheck %s
6+
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon -target-feature +fp8 -S -O3 -o /dev/null %s
7+
8+
// CHECK-LABEL: define dso_local <4 x half> @test_vscale_f16(
9+
// CHECK-SAME: <4 x half> noundef [[VN:%.*]], <4 x i16> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0:[0-9]+]] {
10+
// CHECK-NEXT: entry:
11+
// CHECK-NEXT: [[FSCALE2_I:%.*]] = tail call <4 x half> @llvm.aarch64.neon.fp8.fscale.v4f16(<4 x half> [[VN]], <4 x i16> [[VM]])
12+
// CHECK-NEXT: ret <4 x half> [[FSCALE2_I]]
13+
//
14+
float16x4_t test_vscale_f16(float16x4_t vn, int16x4_t vm) {
15+
return vscale_f16(vn, vm);
16+
}
17+
18+
// CHECK-LABEL: define dso_local <8 x half> @test_vscaleq_f16(
19+
// CHECK-SAME: <8 x half> noundef [[VN:%.*]], <8 x i16> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
20+
// CHECK-NEXT: entry:
21+
// CHECK-NEXT: [[FSCALE2_I:%.*]] = tail call <8 x half> @llvm.aarch64.neon.fp8.fscale.v8f16(<8 x half> [[VN]], <8 x i16> [[VM]])
22+
// CHECK-NEXT: ret <8 x half> [[FSCALE2_I]]
23+
//
24+
float16x8_t test_vscaleq_f16(float16x8_t vn, int16x8_t vm) {
25+
return vscaleq_f16(vn, vm);
26+
27+
}
28+
29+
// CHECK-LABEL: define dso_local <2 x float> @test_vscale_f32(
30+
// CHECK-SAME: <2 x float> noundef [[VN:%.*]], <2 x i32> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
31+
// CHECK-NEXT: entry:
32+
// CHECK-NEXT: [[FSCALE2_I:%.*]] = tail call <2 x float> @llvm.aarch64.neon.fp8.fscale.v2f32(<2 x float> [[VN]], <2 x i32> [[VM]])
33+
// CHECK-NEXT: ret <2 x float> [[FSCALE2_I]]
34+
//
35+
float32x2_t test_vscale_f32(float32x2_t vn, int32x2_t vm) {
36+
return vscale_f32(vn, vm);
37+
38+
}
39+
40+
// CHECK-LABEL: define dso_local <4 x float> @test_vscaleq_f32(
41+
// CHECK-SAME: <4 x float> noundef [[VN:%.*]], <4 x i32> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
42+
// CHECK-NEXT: entry:
43+
// CHECK-NEXT: [[FSCALE2_I:%.*]] = tail call <4 x float> @llvm.aarch64.neon.fp8.fscale.v4f32(<4 x float> [[VN]], <4 x i32> [[VM]])
44+
// CHECK-NEXT: ret <4 x float> [[FSCALE2_I]]
45+
//
46+
float32x4_t test_vscaleq_f32(float32x4_t vn, int32x4_t vm) {
47+
return vscaleq_f32(vn, vm);
48+
49+
}
50+
51+
// CHECK-LABEL: define dso_local <2 x double> @test_vscale_f64(
52+
// CHECK-SAME: <2 x double> noundef [[VN:%.*]], <2 x i64> noundef [[VM:%.*]]) local_unnamed_addr #[[ATTR0]] {
53+
// CHECK-NEXT: entry:
54+
// CHECK-NEXT: [[FSCALE2_I:%.*]] = tail call <2 x double> @llvm.aarch64.neon.fp8.fscale.v2f64(<2 x double> [[VN]], <2 x i64> [[VM]])
55+
// CHECK-NEXT: ret <2 x double> [[FSCALE2_I]]
56+
//
57+
float64x2_t test_vscale_f64(float64x2_t vn, int64x2_t vm) {
58+
return vscaleq_f64(vn, vm);
59+
}

clang/test/Driver/B-opt.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
// Check -B driver option.
22

33
/// Target triple prefix is not detected for -B.
4-
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
4+
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
55
// RUN: -B %S/Inputs/B_opt_tree/dir1 -fuse-ld=ld 2>&1 \
66
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-TRIPLE %s
77
// CHECK-B-OPT-TRIPLE-NOT: "{{.*}}/Inputs/B_opt_tree/dir1{{/|\\\\}}i386-unknown-linux-ld"
88
//
9-
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
9+
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
1010
// RUN: -B %S/Inputs/B_opt_tree/dir2 -fuse-ld=ld 2>&1 \
1111
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-DIR %s
1212
// CHECK-B-OPT-DIR: "{{.*}}/Inputs/B_opt_tree/dir2{{/|\\\\}}ld"
1313
//
14-
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
14+
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
1515
// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- -fuse-ld=ld 2>&1 \
1616
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-PREFIX %s
1717
// CHECK-B-OPT-PREFIX: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"
1818
//
19-
// RUN: %clang %s -### -o %t.o -target i386-unknown-linux \
19+
// RUN: %clang %s -### -o %t.o --target=i386-unknown-linux \
2020
// RUN: -B %S/Inputs/B_opt_tree/dir3/prefix- \
2121
// RUN: -B %S/Inputs/B_opt_tree/dir2 2>&1 -fuse-ld=ld \
2222
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-MULT %s
2323
// CHECK-B-OPT-MULT: "{{.*}}/Inputs/B_opt_tree/dir3{{/|\\\\}}prefix-ld"
2424
//
2525
// RUN: %clang -B %S/Inputs/does_not_exist -print-search-dirs \
26-
// RUN: -target aarch64-linux-gnu \
26+
// RUN: --target=aarch64-linux-gnu \
2727
// RUN: | FileCheck --check-prefix=CHECK-B-OPT-INVALID %s
2828
// CHECK-B-OPT-INVALID-NOT: /..//bin

clang/test/Driver/as-options.s

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
// PR21000: Test that -I is passed to both external and integrated assemblers.
22

3-
// RUN: %clang -target x86_64-linux-gnu -c -no-integrated-as %s \
3+
// RUN: %clang --target=x86_64-linux-gnu -c -no-integrated-as %s \
44
// RUN: -Ifoo_dir -### 2>&1 \
55
// RUN: | FileCheck %s
66

7-
// RUN: %clang -target x86_64-linux-gnu -c -no-integrated-as %s \
7+
// RUN: %clang --target=x86_64-linux-gnu -c -no-integrated-as %s \
88
// RUN: -I foo_dir -### 2>&1 \
99
// RUN: | FileCheck %s
1010

11-
// RUN: %clang -target x86_64-linux-gnu -c -integrated-as %s \
11+
// RUN: %clang --target=x86_64-linux-gnu -c -integrated-as %s \
1212
// RUN: -Ifoo_dir -### 2>&1 \
1313
// RUN: | FileCheck %s
1414

15-
// RUN: %clang -target x86_64-linux-gnu -c -integrated-as %s \
15+
// RUN: %clang --target=x86_64-linux-gnu -c -integrated-as %s \
1616
// RUN: -I foo_dir -### 2>&1 \
1717
// RUN: | FileCheck %s
1818

1919
// Other GNU targets
2020

21-
// RUN: %clang -target aarch64-linux-gnu -c -no-integrated-as %s \
21+
// RUN: %clang --target=aarch64-linux-gnu -c -no-integrated-as %s \
2222
// RUN: -Ifoo_dir -### 2>&1 \
2323
// RUN: | FileCheck %s
2424

25-
// RUN: %clang -target aarch64-linux-gnu -c -integrated-as %s \
25+
// RUN: %clang --target=aarch64-linux-gnu -c -integrated-as %s \
2626
// RUN: -Ifoo_dir -### 2>&1 \
2727
// RUN: | FileCheck %s
2828

29-
// RUN: %clang -target armv7-linux-gnueabihf -c -no-integrated-as %s \
29+
// RUN: %clang --target=armv7-linux-gnueabihf -c -no-integrated-as %s \
3030
// RUN: -Ifoo_dir -### 2>&1 \
3131
// RUN: | FileCheck %s
3232

33-
// RUN: %clang -target armv7-linux-gnueabihf -c -integrated-as %s \
33+
// RUN: %clang --target=armv7-linux-gnueabihf -c -integrated-as %s \
3434
// RUN: -Ifoo_dir -### 2>&1 \
3535
// RUN: | FileCheck %s
3636

@@ -53,45 +53,45 @@
5353
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
5454
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
5555

56-
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
56+
// RUN: %clang -mimplicit-it=always --target=armv7-linux-gnueabi -E \
5757
// RUN: -fintegrated-as -o /dev/null -x c++ %s 2>&1 \
5858
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
59-
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
59+
// RUN: %clang -mimplicit-it=always --target=armv7-linux-gnueabi -E \
6060
// RUN: -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
6161
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
6262

63-
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
63+
// RUN: %clang -mimplicit-it=always --target=armv7-linux-gnueabi -E \
6464
// RUN: -fintegrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
6565
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
66-
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
66+
// RUN: %clang -mimplicit-it=always --target=armv7-linux-gnueabi -E \
6767
// RUN: -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
6868
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
6969

70-
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
70+
// RUN: %clang -Wa,-mbig-obj --target=i386-pc-windows -E -fintegrated-as \
7171
// RUN: -o /dev/null -x c++ %s 2>&1 \
7272
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
73-
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
73+
// RUN: %clang -Wa,-mbig-obj --target=i386-pc-windows -E -fno-integrated-as \
7474
// RUN: -o /dev/null -x c++ %s 2>&1 \
7575
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
7676

77-
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
77+
// RUN: %clang -Wa,-mbig-obj --target=i386-pc-windows -E -fintegrated-as \
7878
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
7979
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
80-
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
80+
// RUN: %clang -Wa,-mbig-obj --target=i386-pc-windows -E -fno-integrated-as \
8181
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
8282
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
8383

84-
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
84+
// RUN: %clang -Xassembler -mbig-obj --target=i386-pc-windows -E -fintegrated-as \
8585
// RUN: -o /dev/null -x c++ %s 2>&1 \
8686
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
87-
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
87+
// RUN: %clang -Xassembler -mbig-obj --target=i386-pc-windows -E \
8888
// RUN: -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
8989
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
9090

91-
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
91+
// RUN: %clang -Xassembler -mbig-obj --target=i386-pc-windows -E -fintegrated-as \
9292
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
9393
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
94-
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
94+
// RUN: %clang -Xassembler -mbig-obj --target=i386-pc-windows -E \
9595
// RUN: -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
9696
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
9797

clang/test/Driver/cl-options.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,9 @@
406406
// RUN: /Zm \
407407
// RUN: /Zo \
408408
// RUN: /Zo- \
409-
// RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s
409+
// RUN: -### -- %s 2>&1 | FileCheck -DMSG=%errc_ENOENT -check-prefix=IGNORED %s
410410
// IGNORED-NOT: argument unused during compilation
411-
// IGNORED-NOT: no such file or directory
411+
// IGNORED-NOT: [[MSG]]
412412
// Don't confuse /openmp- with the /o flag:
413413
// IGNORED-NOT: "-o" "penmp-.obj"
414414

clang/test/Driver/cl-zc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@
133133
// RUN: /Zc:inline \
134134
// RUN: /Zc:rvalueCast \
135135
// RUN: /Zc:ternary \
136-
// RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s
136+
// RUN: -### -- %s 2>&1 | FileCheck -DMSG=%errc_ENOENT -check-prefix=IGNORED %s
137137
// IGNORED-NOT: argument unused during compilation
138-
// IGNORED-NOT: no such file or directory
138+
// IGNORED-NOT: [[MSG]]
139139

140140
// Negated form warns:
141141
// RUN: %clang_cl /c \

clang/test/Driver/clang_f_opts.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@
463463
// RUN: %clang -### -S -fno-unsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN4 %s
464464
// CHAR-SIGN4-NOT: -fno-signed-char
465465

466-
// RUN: %clang -target x86_64-unknown-none-none -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 -check-prefix=DELIMITERS %s
467-
// RUN: %clang -target x86_64-unknown-none-none -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 -check-prefix=DELIMITERS %s
466+
// RUN: %clang --target=x86_64-unknown-none-none -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 -check-prefix=DELIMITERS %s
467+
// RUN: %clang --target=x86_64-unknown-none-none -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 -check-prefix=DELIMITERS %s
468468
// Make sure we don't match the -NOT lines with the linker invocation.
469469
// Delimiters match the start of the cc1 and the start of the linker lines
470470
// DELIMITERS: {{^ (\(in-process\)|")}}
@@ -489,7 +489,7 @@
489489
// CHECK-ALLOW-PLACEHOLDERS: -fallow-editor-placeholders
490490
// CHECK-NO-ALLOW-PLACEHOLDERS-NOT: -fallow-editor-placeholders
491491

492-
// RUN: %clang -### -target x86_64-unknown-windows-msvc -fno-short-wchar %s 2>&1 | FileCheck -check-prefix CHECK-WINDOWS-ISO10646 %s
492+
// RUN: %clang -### --target=x86_64-unknown-windows-msvc -fno-short-wchar %s 2>&1 | FileCheck -check-prefix CHECK-WINDOWS-ISO10646 %s
493493
// CHECK-WINDOWS-ISO10646: "-fwchar-type=int"
494494
// CHECK-WINDOWS-ISO10646: "-fsigned-wchar"
495495

@@ -530,16 +530,16 @@
530530
// CHECK-NO-NULL-POINTER-CHECKS: "-fno-delete-null-pointer-checks"
531531
// CHECK-NULL-POINTER-CHECKS-NOT: "-fno-delete-null-pointer-checks"
532532

533-
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
534-
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
535-
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-gcc-switches -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
536-
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-gcc-switches -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
537-
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
538-
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
539-
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-command-line -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
540-
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-command-line -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
533+
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
534+
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
535+
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-gcc-switches -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
536+
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-gcc-switches -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
537+
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
538+
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
539+
// RUN: %clang -### -S --target=x86_64-unknown-linux -fno-record-command-line -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
540+
// RUN: %clang -### -S --target=x86_64-unknown-linux -frecord-command-line -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s
541541
// Test with a couple examples of non-ELF object file formats
542-
// RUN: %clang -### -S -target x86_64-unknown-macosx -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
542+
// RUN: %clang -### -S --target=x86_64-unknown-macosx -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s
543543
// RUN: not %clang -### -S --target=x86_64-unknown-windows -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ERROR %s
544544
// CHECK-RECORD-GCC-SWITCHES: "-record-command-line"
545545
// CHECK-NO-RECORD-GCC-SWITCHES-NOT: "-record-command-line"
@@ -553,7 +553,7 @@
553553
// RUN: rm -rf "%t.r/with spaces"
554554
// RUN: mkdir -p "%t.r/with spaces"
555555
// RUN: cp %clang "%t.r/with spaces/clang"
556-
// RUN: "%t.r/with spaces/clang" -### -S -target x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ESCAPED %s
556+
// RUN: "%t.r/with spaces/clang" -### -S --target=x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ESCAPED %s
557557
// CHECK-RECORD-GCC-SWITCHES-ESCAPED: "-record-command-line" "{{.+}}with\\ spaces{{.+}}"
558558
// Clean up copy of large binary copied into temp directory to avoid bloat.
559559
// RUN: rm -f "%t.r/with spaces/clang" || true
@@ -599,23 +599,23 @@
599599
// CHECK_DISABLE_DIRECT: -fobjc-disable-direct-methods-for-testing
600600
// CHECK_NO_DISABLE_DIRECT-NOT: -fobjc-disable-direct-methods-for-testing
601601

602-
// RUN: %clang -### -S -fjmc -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s
603-
// RUN: %clang -### -S -fjmc -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s
604-
// RUN: %clang -### -S -fjmc -g -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s
605-
// RUN: %clang -### -S -fjmc -g -fno-jmc -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
606-
// RUN: %clang -### -S -fjmc -g -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s
607-
// RUN: %clang -### -S -fjmc -g -fno-jmc -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
608-
// RUN: %clang -### -fjmc -g -flto -target x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
609-
// RUN: %clang -### -fjmc -g -flto -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC_LTO %s
610-
// RUN: %clang -### -fjmc -g -flto -fno-jmc -target x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
602+
// RUN: %clang -### -S -fjmc --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s
603+
// RUN: %clang -### -S -fjmc --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefixes=CHECK_JMC_WARN,CHECK_NOJMC %s
604+
// RUN: %clang -### -S -fjmc -g --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s
605+
// RUN: %clang -### -S -fjmc -g -fno-jmc --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
606+
// RUN: %clang -### -S -fjmc -g --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC %s
607+
// RUN: %clang -### -S -fjmc -g -fno-jmc --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC %s
608+
// RUN: %clang -### -fjmc -g -flto --target=x86_64-pc-windows-msvc %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
609+
// RUN: %clang -### -fjmc -g -flto --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_JMC_LTO %s
610+
// RUN: %clang -### -fjmc -g -flto -fno-jmc --target=x86_64-unknown-linux %s 2>&1 | FileCheck -check-prefix=CHECK_NOJMC_LTO %s
611611
// CHECK_JMC_WARN: -fjmc requires debug info. Use -g or debug options that enable debugger's stepping function; option ignored
612612
// CHECK_JMC_WARN_NOT_ELF: -fjmc works only for ELF; option ignored
613613
// CHECK_NOJMC-NOT: -fjmc
614614
// CHECK_JMC: -fjmc
615615
// CHECK_NOJMC_LTO-NOT: -plugin-opt=-enable-jmc-instrument
616616
// CHECK_JMC_LTO: -plugin-opt=-enable-jmc-instrument
617617

618-
// RUN: %clang -### -fintegrated-objemitter -target x86_64 %s 2>&1 | FileCheck -check-prefix=CHECK-INT-OBJEMITTER %s
618+
// RUN: %clang -### -fintegrated-objemitter --target=x86_64 %s 2>&1 | FileCheck -check-prefix=CHECK-INT-OBJEMITTER %s
619619
// CHECK-INT-OBJEMITTER-NOT: unsupported option '-fintegrated-objemitter' for target
620620
// RUN: not %clang -### -fno-integrated-objemitter --target=x86_64 %s 2>&1 | FileCheck -check-prefix=CHECK-NOINT-OBJEMITTER %s
621621
// CHECK-NOINT-OBJEMITTER: unsupported option '-fno-integrated-objemitter' for target

0 commit comments

Comments
 (0)