Skip to content

Commit 2c28b7a

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:aea06684992873f70c5834e2f455f913e5b8d671 into amd-gfx:617ef4684340
Local branch amd-gfx 617ef46 Merged main:4be1c19a9fbdff02044cd46b703c842bb7a6afdb into amd-gfx:8e51b74fa82f Remote branch main aea0668 [lldb][test] Use tools from llvm instead of compiler tools (llvm#109961)
2 parents 617ef46 + aea0668 commit 2c28b7a

File tree

27 files changed

+1730
-59
lines changed

27 files changed

+1730
-59
lines changed

clang/include/clang/Basic/arm_sve.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2418,6 +2418,16 @@ let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2" in {
24182418
def SVUUNPK_X4 : SInst<"svunpk_{d}[_{3}_x4]", "42.h", "UsUiUl", MergeNone, "aarch64_sve_uunpk_x4", [IsStreaming], []>;
24192419
}
24202420

2421+
//
2422+
// Multi-vector scaling
2423+
//
2424+
let SVETargetGuard = InvalidMode, SMETargetGuard = "sme2,fp8" in {
2425+
def FSCALE_SINGLE_X2 : Inst<"svscale[_single_{d}_x2]", "22x", "fhd", MergeNone, "aarch64_sme_fp8_scale_single_x2", [IsStreaming],[]>;
2426+
def FSCALE_SINGLE_X4 : Inst<"svscale[_single_{d}_x4]", "44x", "fhd", MergeNone, "aarch64_sme_fp8_scale_single_x4", [IsStreaming],[]>;
2427+
def FSCALE_X2 : Inst<"svscale[_{d}_x2]", "222.x", "fhd", MergeNone, "aarch64_sme_fp8_scale_x2", [IsStreaming],[]>;
2428+
def FSCALE_X4 : Inst<"svscale[_{d}_x4]", "444.x", "fhd", MergeNone, "aarch64_sme_fp8_scale_x4", [IsStreaming],[]>;
2429+
}
2430+
24212431
let SVETargetGuard = "sve2p1", SMETargetGuard = "sme2" in {
24222432
// == BFloat16 multiply-subtract ==
24232433
def SVBFMLSLB : SInst<"svbfmlslb[_{d}]", "dd$$", "f", MergeNone, "aarch64_sve_bfmlslb", [IsOverloadNone, VerifyRuntimeMode], []>;

clang/lib/Driver/ToolChains/PS4CPU.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ toolchains::PS4PS5Base::PS4PS5Base(const Driver &D, const llvm::Triple &Triple,
338338
}
339339

340340
// Allow --sysroot= to override the root directory for header and library
341-
// search, and -sysroot to override header search. If both are specified,
341+
// search, and -isysroot to override header search. If both are specified,
342342
// -isysroot overrides --sysroot for header search.
343343
auto OverrideRoot = [&](const options::ID &Opt, std::string &Root,
344344
StringRef Default) {

clang/test/CodeGen/aarch64-fp8-intrinsics/acle_sme2_fp8_scale.c

Lines changed: 452 additions & 0 deletions
Large diffs are not rendered by default.

compiler-rt/lib/rtsan/rtsan.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
//
99
//===----------------------------------------------------------------------===//
1010

11-
#include <rtsan/rtsan.h>
12-
#include <rtsan/rtsan_assertions.h>
13-
#include <rtsan/rtsan_diagnostics.h>
14-
#include <rtsan/rtsan_flags.h>
15-
#include <rtsan/rtsan_interceptors.h>
11+
#include "rtsan/rtsan.h"
12+
#include "rtsan/rtsan_assertions.h"
13+
#include "rtsan/rtsan_diagnostics.h"
14+
#include "rtsan/rtsan_flags.h"
15+
#include "rtsan/rtsan_interceptors.h"
1616

1717
#include "sanitizer_common/sanitizer_atomic.h"
1818
#include "sanitizer_common/sanitizer_common.h"

compiler-rt/lib/rtsan/rtsan_context.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
//
99
//===----------------------------------------------------------------------===//
1010

11-
#include <rtsan/rtsan.h>
12-
#include <rtsan/rtsan_context.h>
11+
#include "rtsan/rtsan_context.h"
12+
#include "rtsan/rtsan.h"
1313

14-
#include <sanitizer_common/sanitizer_allocator_internal.h>
14+
#include "sanitizer_common/sanitizer_allocator_internal.h"
1515

1616
#include <new>
1717
#include <pthread.h>

compiler-rt/lib/rtsan/rtsan_context.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010

1111
#pragma once
1212

13-
#include <sanitizer_common/sanitizer_internal_defs.h>
14-
1513
namespace __rtsan {
1614

1715
class Context {

compiler-rt/lib/rtsan/rtsan_preinit.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
//
99
//===----------------------------------------------------------------------===//
1010

11+
#include "rtsan/rtsan.h"
1112
#include "sanitizer_common/sanitizer_internal_defs.h"
12-
#include <rtsan/rtsan.h>
1313

1414
#if SANITIZER_CAN_USE_PREINIT_ARRAY
1515

compiler-rt/lib/rtsan/tests/rtsan_test_functional.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
#include "gtest/gtest.h"
1616

1717
#include "rtsan_test_utilities.h"
18-
#include <rtsan.h>
19-
#include <sanitizer_common/sanitizer_platform.h>
20-
#include <sanitizer_common/sanitizer_platform_interceptors.h>
18+
19+
#include "rtsan/rtsan.h"
20+
#include "sanitizer_common/sanitizer_platform.h"
21+
#include "sanitizer_common/sanitizer_platform_interceptors.h"
2122

2223
#include <array>
2324
#include <atomic>

compiler-rt/lib/rtsan/tests/rtsan_test_interceptors.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
#include "gtest/gtest.h"
1212

13-
#include <sanitizer_common/sanitizer_platform.h>
14-
#include <sanitizer_common/sanitizer_platform_interceptors.h>
13+
#include "sanitizer_common/sanitizer_platform.h"
14+
#include "sanitizer_common/sanitizer_platform_interceptors.h"
1515

1616
#include "rtsan_test_utilities.h"
1717

lld/test/COFF/Inputs/loadconfig-arm64ec.s

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ __os_arm64x_check_icall_cfg:
4242
.xword 0
4343
__os_arm64x_dispatch_fptr:
4444
.xword 0
45-
__os_arm64x_helper0:
46-
.xword 0
47-
__os_arm64x_helper1:
48-
.xword 0
49-
__os_arm64x_helper2:
50-
.xword 0
5145
__os_arm64x_helper3:
5246
.xword 0
5347
__os_arm64x_helper4:
@@ -65,7 +59,7 @@ __os_arm64x_helper8:
6559
.globl __chpe_metadata
6660
.p2align 3, 0
6761
__chpe_metadata:
68-
.word 1
62+
.word 2
6963
.rva __hybrid_code_map
7064
.word __hybrid_code_map_count
7165
.rva __x64_code_ranges_to_entry_points
@@ -85,9 +79,9 @@ __chpe_metadata:
8579
.word __arm64x_extra_rfe_table_size
8680
.rva __os_arm64x_dispatch_fptr
8781
.rva __hybrid_auxiliary_iat_copy
88-
.rva __os_arm64x_helper0
89-
.rva __os_arm64x_helper1
90-
.rva __os_arm64x_helper2
82+
.word 0 // __hybrid_auxiliary_delayload_iat
83+
.word 0 // __hybrid_auxiliary_delayload_iat_copy
84+
.word 0 // __hybrid_image_info_bitfield
9185
.rva __os_arm64x_helper3
9286
.rva __os_arm64x_helper4
9387
.rva __os_arm64x_helper5

lld/test/COFF/arm64ec-import.test

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RUN: llvm-readobj --coff-imports out2.dll | FileCheck --check-prefix=IMPORTS %s
2727
RUN: llvm-readobj --coff-imports out3.dll | FileCheck -check-prefix=IMPORTS %s
2828
IMPORTS: Import {
2929
IMPORTS-NEXT: Name: test.dll
30-
IMPORTS-NEXT: ImportLookupTableRVA: 0x4230
30+
IMPORTS-NEXT: ImportLookupTableRVA: 0x4218
3131
IMPORTS-NEXT: ImportAddressTableRVA: 0x3000
3232
IMPORTS-NEXT: Symbol: data (0)
3333
IMPORTS-NEXT: Symbol: func (0)
@@ -79,13 +79,13 @@ RUN: llvm-readobj --hex-dump=.test out2.dll | FileCheck --check-prefix=TESTSEC %
7979
TESTSEC: 0x180007000 08500000 00300000 10500000 20500000
8080
TESTSEC-NEXT: 0x180007010 08300000 00500000 10300000 20300000
8181
TESTSEC-NEXT: 0x180007020 14100000 28100000 00200000 08100000
82-
TESTSEC-NEXT: 0x180007030 3c100000 a0420000
82+
TESTSEC-NEXT: 0x180007030 3c100000 88420000
8383

8484
RUN: llvm-readobj --hex-dump=.test out3.dll | FileCheck -check-prefix=TESTSEC-X64 %s
8585
TESTSEC-X64: 0x180007000 08300000 00300000 10300000 20300000
8686
TESTSEC-X64-NEXT: 0x180007010 08300000 00500000 10300000 20300000
8787
TESTSEC-X64-NEXT: 0x180007020 14100000 28100000 00200000 08100000
88-
TESTSEC-X64-NEXT: 0x180007030 3c100000 a0420000
88+
TESTSEC-X64-NEXT: 0x180007030 3c100000 88420000
8989

9090
RUN: FileCheck --check-prefix=MAP %s < out.map
9191
RUN: FileCheck --check-prefix=MAP %s < out2.map
@@ -100,10 +100,10 @@ MAP-NEXT: 0002:00000000 __imp_data 0000000180003000 te
100100
MAP-NEXT: 0002:00000008 __imp_aux_func 0000000180003008 test{{.*}}:test.dll
101101
MAP-NEXT: 0002:00000010 __imp_aux_func2 0000000180003010 test{{.*}}:test.dll
102102
MAP-NEXT: 0002:00000020 __imp_aux_t2func 0000000180003020 test2{{.*}}:test2.dll
103-
MAP: 0002:00001298 __auximpcopy_data 0000000180004298 test{{.*}}:test.dll
104-
MAP-NEXT: 0002:000012a0 __auximpcopy_func 00000001800042a0 test{{.*}}:test.dll
105-
MAP-NEXT: 0002:000012a8 __auximpcopy_func2 00000001800042a8 test{{.*}}:test.dll
106-
MAP-NEXT: 0002:000012b8 __auximpcopy_t2func 00000001800042b8 test2{{.*}}:test2.dll
103+
MAP: 0002:00001280 __auximpcopy_data 0000000180004280 test{{.*}}:test.dll
104+
MAP-NEXT: 0002:00001288 __auximpcopy_func 0000000180004288 test{{.*}}:test.dll
105+
MAP-NEXT: 0002:00001290 __auximpcopy_func2 0000000180004290 test{{.*}}:test.dll
106+
MAP-NEXT: 0002:000012a0 __auximpcopy_t2func 00000001800042a0 test2{{.*}}:test2.dll
107107
MAP: 0002:00002000 __imp_aux_data 0000000180005000 test{{.*}}:test.dll
108108
MAP-NEXT: 0002:00002008 __imp_func 0000000180005008 test{{.*}}:test.dll
109109
MAP-NEXT: 0002:00002010 __imp_func2 0000000180005010 test{{.*}}:test.dll
@@ -120,15 +120,14 @@ RUN: llvm-readobj --coff-load-config out.dll | FileCheck -check-prefix=LOADCONFI
120120
RUN: llvm-readobj --coff-load-config out2.dll | FileCheck -check-prefix=LOADCONFIG %s
121121
RUN: llvm-readobj --coff-load-config out3.dll | FileCheck -check-prefix=LOADCONFIG %s
122122
LOADCONFIG: AuxiliaryIAT: 0x5000
123-
LOADCONFIG: AuxiliaryIATCopy: 0x4298
123+
LOADCONFIG: AuxiliaryIATCopy: 0x4280
124124

125125
RUN: llvm-readobj --hex-dump=.rdata out.dll | FileCheck -check-prefix=RDATA %s
126126
RUN: llvm-readobj --hex-dump=.rdata out2.dll | FileCheck -check-prefix=RDATA %s
127127
RUN: llvm-readobj --hex-dump=.rdata out3.dll | FileCheck -check-prefix=RDATA %s
128-
RDATA: 0x180004290 2e646c6c 00000000 00000000 00000000
129-
RDATA-NEXT: 0x1800042a0 14100080 01000000 28100080 01000000
130-
RDATA-NEXT: 0x1800042b0 00000000 00000000 48100080 01000000
131-
RDATA-NEXT: 0x1800042c0 00000000 00000000 00000000 00000000
128+
RDATA: 0x180004280 00000000 00000000 14100080 01000000
129+
RDATA-NEXT: 0x180004290 28100080 01000000 00000000 00000000
130+
RDATA-NEXT: 0x1800042a0 48100080 01000000 00000000 00000000
132131
RDATA: 0x180005000 00000000 00000000 14100080 01000000
133132
RDATA-NEXT: 0x180005010 28100080 01000000 00000000 00000000
134133
RDATA-NEXT: 0x180005020 48100080 01000000 00000000 00000000
@@ -138,15 +137,15 @@ RUN: llvm-readobj --coff-basereloc out2.dll | FileCheck -check-prefix=BASERELOC
138137
RUN: llvm-readobj --coff-basereloc out3.dll | FileCheck -check-prefix=BASERELOC %s
139138
BASERELOC: BaseReloc [
140139
Aux IAT copy:
141-
BASERELOC: Address: 0x42A0
140+
BASERELOC: Address: 0x4288
142141
BASERELOC-NEXT: }
143142
BASERELOC-NEXT: Entry {
144143
BASERELOC-NEXT: Type: DIR64
145-
BASERELOC-NEXT: Address: 0x42A8
144+
BASERELOC-NEXT: Address: 0x4290
146145
BASERELOC-NEXT: }
147146
BASERELOC-NEXT: Entry {
148147
BASERELOC-NEXT: Type: DIR64
149-
BASERELOC-NEXT: Address: 0x42B8
148+
BASERELOC-NEXT: Address: 0x42A0
150149
BASERELOC-NEXT: }
151150
Aux IAT:
152151
BASERELOC-NOT: Address: 0x5000

lldb/packages/Python/lldbsuite/test/builders/builder.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,10 @@ def getToolchainSpec(self, compiler):
110110
if not cc:
111111
return []
112112

113+
exe_ext = ""
114+
if lldbplatformutil.getHostPlatform() == "windows":
115+
exe_ext = ".exe"
116+
113117
cc = cc.strip()
114118
cc_path = pathlib.Path(cc)
115119

@@ -149,9 +153,9 @@ def getToolchainSpec(self, compiler):
149153
cc_dir = cc_path.parent
150154

151155
def getToolchainUtil(util_name):
152-
return cc_dir / (cc_prefix + util_name + cc_ext)
156+
return os.path.join(configuration.llvm_tools_dir, util_name + exe_ext)
153157

154-
cxx = getToolchainUtil(cxx_type)
158+
cxx = cc_dir / (cc_prefix + cxx_type + cc_ext)
155159

156160
util_names = {
157161
"OBJCOPY": "objcopy",
@@ -161,6 +165,10 @@ def getToolchainUtil(util_name):
161165
}
162166
utils = []
163167

168+
# Required by API TestBSDArchives.py tests.
169+
if not os.getenv("LLVM_AR"):
170+
utils.extend(["LLVM_AR=%s" % getToolchainUtil("llvm-ar")])
171+
164172
if not lldbplatformutil.platformIsDarwin():
165173
if cc_type in ["clang", "cc", "gcc"]:
166174
util_paths = {}

lldb/packages/Python/lldbsuite/test/configuration.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@
118118
# same base name.
119119
all_tests = set()
120120

121+
# Path to LLVM tools to be used by tests.
122+
llvm_tools_dir = None
123+
121124
# LLDB library directory.
122125
lldb_libs_dir = None
123126
lldb_obj_root = None

lldb/packages/Python/lldbsuite/test/dotest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ def parseOptionsAndInitTestdirs():
280280
"xcrun -find -toolchain default dsymutil"
281281
)
282282
if args.llvm_tools_dir:
283+
configuration.llvm_tools_dir = args.llvm_tools_dir
283284
configuration.filecheck = shutil.which("FileCheck", path=args.llvm_tools_dir)
284285
configuration.yaml2obj = shutil.which("yaml2obj", path=args.llvm_tools_dir)
285286

lldb/test/API/functionalities/archives/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,10 @@ libfoo.a: a.o b.o
1212

1313
# This tests whether lldb can load a thin archive
1414
libbar.a: c.o
15-
$(eval LLVM_AR := $(LLVM_TOOLS_DIR)/llvm-ar)
1615
$(eval LLVM_ARFLAGS := -rcsDT)
1716
$(LLVM_AR) $(LLVM_ARFLAGS) $@ $^
1817

1918
libfoo-thin.a: a.o b.o
20-
$(eval LLVM_AR := $(LLVM_TOOLS_DIR)/llvm-ar)
2119
$(eval LLVM_ARFLAGS := -rcsUT)
2220
$(LLVM_AR) $(LLVM_ARFLAGS) $@ $^
2321

llvm/include/llvm/CodeGen/GlobalISel/LegalizerHelper.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ class LegalizerHelper {
394394
LegalizeResult lowerRotate(MachineInstr &MI);
395395

396396
LegalizeResult lowerU64ToF32BitOps(MachineInstr &MI);
397+
LegalizeResult lowerU64ToF32WithSITOFP(MachineInstr &MI);
398+
LegalizeResult lowerU64ToF64BitFloatOps(MachineInstr &MI);
397399
LegalizeResult lowerUITOFP(MachineInstr &MI);
398400
LegalizeResult lowerSITOFP(MachineInstr &MI);
399401
LegalizeResult lowerFPTOUI(MachineInstr &MI);

llvm/include/llvm/Config/llvm-config.h.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Indicate that this is LLVM compiled from the amd-gfx branch. */
1818
#define LLVM_HAVE_BRANCH_AMD_GFX
19-
#define LLVM_MAIN_REVISION 513031
19+
#define LLVM_MAIN_REVISION 513040
2020

2121
/* Define if LLVM_ENABLE_DUMP is enabled */
2222
#cmakedefine LLVM_ENABLE_DUMP

llvm/include/llvm/IR/IntrinsicsAArch64.td

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3762,6 +3762,31 @@ let TargetPrefix = "aarch64" in {
37623762
: DefaultAttrsIntrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>],
37633763
[llvm_i32_ty, llvm_nxv16i8_ty, llvm_i32_ty],
37643764
[ImmArg<ArgIndex<0>>, ImmArg<ArgIndex<2>>, IntrReadMem]>;
3765+
3766+
//
3767+
// Register scaling
3768+
//
3769+
def int_aarch64_sme_fp8_scale_single_x2
3770+
: DefaultAttrsIntrinsic<[llvm_anyvector_ty, LLVMMatchType<0>],
3771+
[LLVMMatchType<0>, LLVMMatchType<0>, LLVMVectorOfBitcastsToInt<0>],
3772+
[IntrNoMem]>;
3773+
3774+
def int_aarch64_sme_fp8_scale_single_x4
3775+
: DefaultAttrsIntrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>],
3776+
[LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>, LLVMVectorOfBitcastsToInt<0>],
3777+
[IntrNoMem]>;
3778+
3779+
def int_aarch64_sme_fp8_scale_x2
3780+
: DefaultAttrsIntrinsic<[llvm_anyvector_ty, LLVMMatchType<0>],
3781+
[LLVMMatchType<0>, LLVMMatchType<0>,
3782+
LLVMVectorOfBitcastsToInt<0>, LLVMVectorOfBitcastsToInt<0>],
3783+
[IntrNoMem]>;
3784+
3785+
def int_aarch64_sme_fp8_scale_x4
3786+
: DefaultAttrsIntrinsic<[llvm_anyvector_ty, LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>],
3787+
[LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>, LLVMMatchType<0>,
3788+
LLVMVectorOfBitcastsToInt<0>, LLVMVectorOfBitcastsToInt<0>, LLVMVectorOfBitcastsToInt<0>, LLVMVectorOfBitcastsToInt<0>],
3789+
[IntrNoMem]>;
37653790
}
37663791

37673792
// SVE2.1 - ZIPQ1, ZIPQ2, UZPQ1, UZPQ2

0 commit comments

Comments
 (0)