Skip to content

Commit 2a2d668

Browse files
authored
Merge branch 'llvm:main' into gh-101657
2 parents 38ce4a5 + 366e836 commit 2a2d668

Some content is hidden

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

46 files changed

+2061
-629
lines changed

clang/test/Driver/print-supported-extensions-riscv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@
185185
// CHECK-NEXT: zalasr 0.1 'Zalasr' (Load-Acquire and Store-Release Instructions)
186186
// CHECK-NEXT: zvbc32e 0.7 'Zvbc32e' (Vector Carryless Multiplication with 32-bits elements)
187187
// CHECK-NEXT: zvkgs 0.7 'Zvkgs' (Vector-Scalar GCM instructions for Cryptography)
188+
// CHECK-NEXT: sdext 1.0 'Sdext' (External debugger)
189+
// CHECK-NEXT: sdtrig 1.0 'Sdtrig' (Debugger triggers)
188190
// CHECK-NEXT: smctr 1.0 'Smctr' (Control Transfer Records Machine Level)
189191
// CHECK-NEXT: ssctr 1.0 'Ssctr' (Control Transfer Records Supervisor Level)
190192
// CHECK-NEXT: svukte 0.3 'Svukte' (Address-Independent Latency of User-Mode Faults to Supervisor Addresses)

clang/test/Preprocessor/riscv-target-features.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@
182182

183183
// Experimental extensions
184184

185+
// CHECK-NOT: __riscv_sdext{{.*$}}
186+
// CHECK-NOT: __riscv_sdtrig{{.*$}}
185187
// CHECK-NOT: __riscv_smctr{{.*$}}
186188
// CHECK-NOT: __riscv_smmpm{{.*$}}
187189
// CHECK-NOT: __riscv_smnpm{{.*$}}
@@ -1795,6 +1797,22 @@
17951797
// RUN: -o - | FileCheck --check-prefix=CHECK-SUPM-EXT %s
17961798
// CHECK-SUPM-EXT: __riscv_supm 1000000{{$}}
17971799

1800+
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
1801+
// RUN: -march=rv32i_sdext1p0 -E -dM %s \
1802+
// RUN: -o - | FileCheck --check-prefix=CHECK-SDEXT-EXT %s
1803+
// RUN: %clang --target=riscv64 -menable-experimental-extensions \
1804+
// RUN: -march=rv64i_sdext1p0 -E -dM %s \
1805+
// RUN: -o - | FileCheck --check-prefix=CHECK-SDEXT-EXT %s
1806+
// CHECK-SDEXT-EXT: __riscv_sdext 1000000{{$}}
1807+
1808+
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
1809+
// RUN: -march=rv32i_sdtrig1p0 -E -dM %s \
1810+
// RUN: -o - | FileCheck --check-prefix=CHECK-SDTRIG-EXT %s
1811+
// RUN: %clang --target=riscv64 -menable-experimental-extensions \
1812+
// RUN: -march=rv64i_sdtrig1p0 -E -dM %s \
1813+
// RUN: -o - | FileCheck --check-prefix=CHECK-SDTRIG-EXT %s
1814+
// CHECK-SDTRIG-EXT: __riscv_sdtrig 1000000{{$}}
1815+
17981816
// RUN: %clang --target=riscv32 -menable-experimental-extensions \
17991817
// RUN: -march=rv32i_smctr1p0 -E -dM %s \
18001818
// RUN: -o - | FileCheck --check-prefix=CHECK-SMCTR-EXT %s

llvm/docs/RISCVUsage.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,9 @@ The primary goal of experimental support is to assist in the process of ratifica
326326
``experimental-zvbc32e``, ``experimental-zvkgs``
327327
LLVM implements the `0.7 release specification <https://github.com/user-attachments/files/16450464/riscv-crypto-spec-vector-extra_v0.0.7.pdf>`__.
328328

329+
``experimental-sdext``, ``experimental-sdtrig``
330+
LLVM implements the `1.0-rc4 specification <https://github.com/riscv/riscv-debug-spec/releases/download/1.0.0-rc4/riscv-debug-specification.pdf>`__.
331+
329332
``experimental-smctr``, ``experimental-ssctr``
330333
LLVM implements the `1.0-rc3 specification <https://github.com/riscv/riscv-control-transfer-records/releases/tag/v1.0_rc3>`__.
331334

llvm/docs/ReleaseNotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ Changes to the RISC-V Backend
232232
extension.
233233
* Adds experimental assembler support for the Qualcomm uC 'Xqcicli` (Conditional Load Immediate)
234234
extension.
235+
* Added ``Sdext`` and ``Sdtrig`` extensions.
235236

236237
Changes to the WebAssembly Backend
237238
----------------------------------

llvm/lib/Target/AMDGPU/VOP3Instructions.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,8 +1578,8 @@ def : MinimumMaximumByMinimum3Maximum3<fmaximum, f32, V_MAXIMUM3_F32_e64>;
15781578

15791579
defm V_MIN3_NUM_F32 : VOP3_Realtriple_with_name_gfx12<0x229, "V_MIN3_F32", "v_min3_num_f32">;
15801580
defm V_MAX3_NUM_F32 : VOP3_Realtriple_with_name_gfx12<0x22a, "V_MAX3_F32", "v_max3_num_f32">;
1581-
defm V_MIN3_NUM_F16 : VOP3_Realtriple_with_name_gfx12<0x22b, "V_MIN3_F16", "v_min3_num_f16">;
1582-
defm V_MAX3_NUM_F16 : VOP3_Realtriple_with_name_gfx12<0x22c, "V_MAX3_F16", "v_max3_num_f16">;
1581+
defm V_MIN3_NUM_F16 : VOP3_Realtriple_t16_and_fake16_gfx12<0x22b, "v_min3_num_f16", "V_MIN3_F16", "v_min3_f16">;
1582+
defm V_MAX3_NUM_F16 : VOP3_Realtriple_t16_and_fake16_gfx12<0x22c, "v_max3_num_f16", "V_MAX3_F16", "v_max3_f16">;
15831583
defm V_MINIMUM3_F32 : VOP3Only_Realtriple_gfx12<0x22d>;
15841584
defm V_MAXIMUM3_F32 : VOP3Only_Realtriple_gfx12<0x22e>;
15851585
defm V_MINIMUM3_F16 : VOP3Only_Realtriple_t16_gfx12<0x22f>;

llvm/lib/Target/LoongArch/LoongArchInstrInfo.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,11 @@ bool LoongArchInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
406406
// lu32i.d $a1, %ie64_pc_lo20(s)
407407
// lu52i.d $a1, $a1, %ie64_pc_hi12(s)
408408
//
409+
// * pcalau12i $a0, %desc_pc_hi20(s)
410+
// addi.d $a1, $zero, %desc_pc_lo12(s)
411+
// lu32i.d $a1, %desc64_pc_lo20(s)
412+
// lu52i.d $a1, $a1, %desc64_pc_hi12(s)
413+
//
409414
// For simplicity, only pcalau12i and lu52i.d are marked as scheduling
410415
// boundaries, and the instructions between them are guaranteed to be
411416
// ordered according to data dependencies.
@@ -430,12 +435,16 @@ bool LoongArchInstrInfo::isSchedulingBoundary(const MachineInstr &MI,
430435
if (MO0 == LoongArchII::MO_IE_PC_HI && MO1 == LoongArchII::MO_IE_PC_LO &&
431436
MO2 == LoongArchII::MO_IE_PC64_LO)
432437
return true;
438+
if (MO0 == LoongArchII::MO_DESC_PC_HI &&
439+
MO1 == LoongArchII::MO_DESC_PC_LO &&
440+
MO2 == LoongArchII::MO_DESC64_PC_LO)
441+
return true;
433442
break;
434443
}
435444
case LoongArch::LU52I_D: {
436445
auto MO = MI.getOperand(2).getTargetFlags();
437446
if (MO == LoongArchII::MO_PCREL64_HI || MO == LoongArchII::MO_GOT_PC64_HI ||
438-
MO == LoongArchII::MO_IE_PC64_HI)
447+
MO == LoongArchII::MO_IE_PC64_HI || MO == LoongArchII::MO_DESC64_PC_HI)
439448
return true;
440449
break;
441450
}

llvm/lib/Target/PowerPC/PPCInstrInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,8 +643,8 @@ bool PPCInstrInfo::shouldReduceRegisterPressure(
643643
};
644644

645645
// For now we only care about float and double type fma.
646-
unsigned VSSRCLimit = TRI->getRegPressureSetLimit(
647-
*MBB->getParent(), PPC::RegisterPressureSets::VSSRC);
646+
unsigned VSSRCLimit =
647+
RegClassInfo->getRegPressureSetLimit(PPC::RegisterPressureSets::VSSRC);
648648

649649
// Only reduce register pressure when pressure is high.
650650
return GetMBBPressure(MBB)[PPC::RegisterPressureSets::VSSRC] >

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,10 @@ def HasStdExtH : Predicate<"Subtarget->hasStdExtH()">,
844844

845845
// Supervisor extensions
846846

847+
def FeatureStdExtSdext : RISCVExperimentalExtension<1, 0, "External debugger">;
848+
849+
def FeatureStdExtSdtrig : RISCVExperimentalExtension<1, 0, "Debugger triggers">;
850+
847851
def FeatureStdExtShgatpa
848852
: RISCVExtension<1, 0,
849853
"SvNNx4 mode supported for all modes supported by satp, as well as Bare">;

llvm/lib/Target/RISCV/RISCVSystemOperands.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,10 @@ def : SysReg<"tselect", 0x7A0>;
323323
def : SysReg<"tdata1", 0x7A1>;
324324
def : SysReg<"tdata2", 0x7A2>;
325325
def : SysReg<"tdata3", 0x7A3>;
326+
def : SysReg<"tinfo", 0x7A4>;
327+
def : SysReg<"tcontrol", 0x7A5>;
326328
def : SysReg<"mcontext", 0x7A8>;
329+
def : SysReg<"mscontext", 0x7AA>;
327330

328331
//===----------------------------------------------------------------------===//
329332
// Debug Mode Registers

0 commit comments

Comments
 (0)