Use x86_64-redhat-linux as default gcc triple for x86_64_v2
Add riscv64 support
This commit is contained in:
commit
7526ccf930
9
.centos-ignore
Normal file
9
.centos-ignore
Normal file
@ -0,0 +1,9 @@
|
||||
# List of files and directories that are not needed on CentOS/RHEL.
|
||||
/centos-sync.sh
|
||||
/ci.fmf
|
||||
/prepare-copr.sh
|
||||
/tests/kernel-ark-build.fmf
|
||||
/Makefile
|
||||
/.copr
|
||||
/.git-blame-ignore-revs
|
||||
/.packit.yaml
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@
|
||||
/BUILDROOT
|
||||
/out
|
||||
/version.spec.inc
|
||||
/.gdbinit
|
||||
|
||||
59
0001-22-polly-shared-libs.patch
Normal file
59
0001-22-polly-shared-libs.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From daf5077c8ce848b39239879369679c9fea7041b1 Mon Sep 17 00:00:00 2001
|
||||
From: Konrad Kleine <kkleine@redhat.com>
|
||||
Date: Tue, 28 Jan 2025 08:34:09 +0000
|
||||
Subject: [PATCH] shared libs
|
||||
|
||||
---
|
||||
polly/cmake/polly_macros.cmake | 5 ++++-
|
||||
polly/lib/CMakeLists.txt | 1 +
|
||||
polly/lib/External/CMakeLists.txt | 1 +
|
||||
3 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/polly/cmake/polly_macros.cmake b/polly/cmake/polly_macros.cmake
|
||||
index 9bd7b0b0ea59..fc2c3a76901f 100644
|
||||
--- a/polly/cmake/polly_macros.cmake
|
||||
+++ b/polly/cmake/polly_macros.cmake
|
||||
@@ -1,5 +1,5 @@
|
||||
macro(add_polly_library name)
|
||||
- cmake_parse_arguments(ARG "" "" "" ${ARGN})
|
||||
+ cmake_parse_arguments(ARG "SHARED" "" "" ${ARGN})
|
||||
set(srcs ${ARG_UNPARSED_ARGUMENTS})
|
||||
if(MSVC_IDE OR XCODE)
|
||||
file( GLOB_RECURSE headers *.h *.td *.def)
|
||||
@@ -17,6 +17,9 @@ macro(add_polly_library name)
|
||||
else()
|
||||
set(libkind)
|
||||
endif()
|
||||
+ if (ARG_SHARED)
|
||||
+ set(libkind SHARED)
|
||||
+ endif()
|
||||
add_library( ${name} ${libkind} ${srcs} )
|
||||
set_target_properties(${name} PROPERTIES FOLDER "Polly/Libraries")
|
||||
|
||||
diff --git a/polly/lib/CMakeLists.txt b/polly/lib/CMakeLists.txt
|
||||
index 0ed673815ff3..e156dcb31655 100644
|
||||
--- a/polly/lib/CMakeLists.txt
|
||||
+++ b/polly/lib/CMakeLists.txt
|
||||
@@ -41,6 +41,7 @@ set(POLLY_COMPONENTS
|
||||
# the sources them to be recompiled for each of them.
|
||||
add_llvm_pass_plugin(Polly
|
||||
NO_MODULE
|
||||
+ SHARED
|
||||
SUBPROJECT Polly
|
||||
Analysis/DependenceInfo.cpp
|
||||
Analysis/ScopDetection.cpp
|
||||
diff --git a/polly/lib/External/CMakeLists.txt b/polly/lib/External/CMakeLists.txt
|
||||
index ab5cba93cdcf..fdfd06864bc7 100644
|
||||
--- a/polly/lib/External/CMakeLists.txt
|
||||
+++ b/polly/lib/External/CMakeLists.txt
|
||||
@@ -284,6 +284,7 @@ if (POLLY_BUNDLED_ISL)
|
||||
)
|
||||
|
||||
add_polly_library(PollyISL
|
||||
+ SHARED
|
||||
${ISL_FILES}
|
||||
)
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
1354
0001-BPF-Support-Jump-Table-149715.patch
Normal file
1354
0001-BPF-Support-Jump-Table-149715.patch
Normal file
File diff suppressed because it is too large
Load Diff
131
0001-CGP-Bail-out-if-Base-Scaled-Reg-does-not-dominate-in.patch
Normal file
131
0001-CGP-Bail-out-if-Base-Scaled-Reg-does-not-dominate-in.patch
Normal file
@ -0,0 +1,131 @@
|
||||
From dde30a47313bf52fef02bbcb1de931a8d725659f Mon Sep 17 00:00:00 2001
|
||||
From: Florian Hahn <flo@fhahn.com>
|
||||
Date: Fri, 6 Jun 2025 12:38:30 +0100
|
||||
Subject: [PATCH] [CGP] Bail out if (Base|Scaled)Reg does not dominate insert
|
||||
point. (#142949)
|
||||
|
||||
(Base|Scaled)Reg may not dominate the chosen insert point, if there are
|
||||
multiple uses of the address. Bail out if that's the case, otherwise we
|
||||
will generate invalid IR.
|
||||
|
||||
In some cases, we could probably adjust the insert point or hoist the
|
||||
(Base|Scaled)Reg.
|
||||
|
||||
Fixes https://github.com/llvm/llvm-project/issues/142830.
|
||||
|
||||
PR: https://github.com/llvm/llvm-project/pull/142949
|
||||
---
|
||||
llvm/lib/CodeGen/CodeGenPrepare.cpp | 13 +++-
|
||||
.../X86/sink-addrmode-reg-does-not-geps.ll | 76 +++++++++++++++++++
|
||||
2 files changed, 87 insertions(+), 2 deletions(-)
|
||||
create mode 100644 llvm/test/Transforms/CodeGenPrepare/X86/sink-addrmode-reg-does-not-geps.ll
|
||||
|
||||
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
|
||||
index 822ed6283117..32348a899683 100644
|
||||
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
|
||||
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
|
||||
@@ -5945,8 +5945,17 @@ bool CodeGenPrepare::optimizeMemoryInst(Instruction *MemoryInst, Value *Addr,
|
||||
// The current BB may be optimized multiple times, we can't guarantee the
|
||||
// reuse of Addr happens later, call findInsertPos to find an appropriate
|
||||
// insert position.
|
||||
- IRBuilder<> Builder(MemoryInst->getParent(),
|
||||
- findInsertPos(Addr, MemoryInst, SunkAddr));
|
||||
+ auto InsertPos = findInsertPos(Addr, MemoryInst, SunkAddr);
|
||||
+
|
||||
+ // TODO: Adjust insert point considering (Base|Scaled)Reg if possible.
|
||||
+ if (!SunkAddr) {
|
||||
+ auto &DT = getDT(*MemoryInst->getFunction());
|
||||
+ if ((AddrMode.BaseReg && !DT.dominates(AddrMode.BaseReg, &*InsertPos)) ||
|
||||
+ (AddrMode.ScaledReg && !DT.dominates(AddrMode.ScaledReg, &*InsertPos)))
|
||||
+ return Modified;
|
||||
+ }
|
||||
+
|
||||
+ IRBuilder<> Builder(MemoryInst->getParent(), InsertPos);
|
||||
|
||||
if (SunkAddr) {
|
||||
LLVM_DEBUG(dbgs() << "CGP: Reusing nonlocal addrmode: " << AddrMode
|
||||
diff --git a/llvm/test/Transforms/CodeGenPrepare/X86/sink-addrmode-reg-does-not-geps.ll b/llvm/test/Transforms/CodeGenPrepare/X86/sink-addrmode-reg-does-not-geps.ll
|
||||
new file mode 100644
|
||||
index 000000000000..1640bafbd0bf
|
||||
--- /dev/null
|
||||
+++ b/llvm/test/Transforms/CodeGenPrepare/X86/sink-addrmode-reg-does-not-geps.ll
|
||||
@@ -0,0 +1,76 @@
|
||||
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
|
||||
+; RUN: opt -S -passes='require<profile-summary>,function(codegenprepare)' %s | FileCheck %s
|
||||
+
|
||||
+target triple = "x86_64-unknown-linux"
|
||||
+
|
||||
+declare i1 @cond(float)
|
||||
+
|
||||
+define void @scaled_reg_does_not_dominate_insert_point(ptr %src) {
|
||||
+; CHECK-LABEL: define void @scaled_reg_does_not_dominate_insert_point(
|
||||
+; CHECK-SAME: ptr [[SRC:%.*]]) {
|
||||
+; CHECK-NEXT: [[BB:.*]]:
|
||||
+; CHECK-NEXT: br label %[[LOOP:.*]]
|
||||
+; CHECK: [[LOOP]]:
|
||||
+; CHECK-NEXT: [[IV:%.*]] = phi i64 [ 0, %[[BB]] ], [ [[IV_NEXT:%.*]], %[[LOOP]] ]
|
||||
+; CHECK-NEXT: [[IV_NEXT]] = add i64 [[IV]], 1
|
||||
+; CHECK-NEXT: [[SUNKADDR2:%.*]] = mul i64 [[IV_NEXT]], 2
|
||||
+; CHECK-NEXT: [[SUNKADDR3:%.*]] = getelementptr i8, ptr [[SRC]], i64 [[SUNKADDR2]]
|
||||
+; CHECK-NEXT: [[SUNKADDR4:%.*]] = getelementptr i8, ptr [[SUNKADDR3]], i64 6
|
||||
+; CHECK-NEXT: [[L_0:%.*]] = load float, ptr [[SUNKADDR4]], align 4
|
||||
+; CHECK-NEXT: [[SUNKADDR:%.*]] = mul i64 [[IV]], 2
|
||||
+; CHECK-NEXT: [[SUNKADDR1:%.*]] = getelementptr i8, ptr [[SRC]], i64 [[SUNKADDR]]
|
||||
+; CHECK-NEXT: [[L_1:%.*]] = load float, ptr [[SUNKADDR1]], align 4
|
||||
+; CHECK-NEXT: [[TMP0:%.*]] = call i1 @cond(float [[L_0]])
|
||||
+; CHECK-NEXT: [[C:%.*]] = call i1 @cond(float [[L_1]])
|
||||
+; CHECK-NEXT: br i1 [[C]], label %[[LOOP]], label %[[EXIT:.*]]
|
||||
+; CHECK: [[EXIT]]:
|
||||
+; CHECK-NEXT: ret void
|
||||
+;
|
||||
+bb:
|
||||
+ %gep.base = getelementptr i8, ptr %src, i64 8
|
||||
+ br label %loop
|
||||
+
|
||||
+loop:
|
||||
+ %iv = phi i64 [ 0, %bb ], [ %iv.next, %loop ]
|
||||
+ %iv.shl = shl i64 %iv, 1
|
||||
+ %gep.shl = getelementptr i8, ptr %gep.base, i64 %iv.shl
|
||||
+ %gep.sub = getelementptr i8, ptr %gep.shl, i64 -8
|
||||
+ %iv.next = add i64 %iv, 1
|
||||
+ %l.0 = load float, ptr %gep.shl, align 4
|
||||
+ %l.1 = load float, ptr %gep.sub, align 4
|
||||
+ call i1 @cond(float %l.0)
|
||||
+ %c = call i1 @cond(float %l.1)
|
||||
+ br i1 %c, label %loop, label %exit
|
||||
+
|
||||
+exit:
|
||||
+ ret void
|
||||
+}
|
||||
+
|
||||
+define void @check_dt_after_modifying_cfg(ptr %dst, i64 %x, i8 %y, i8 %z) {
|
||||
+; CHECK-LABEL: define void @check_dt_after_modifying_cfg(
|
||||
+; CHECK-SAME: ptr [[DST:%.*]], i64 [[X:%.*]], i8 [[Y:%.*]], i8 [[Z:%.*]]) {
|
||||
+; CHECK-NEXT: [[ENTRY:.*]]:
|
||||
+; CHECK-NEXT: [[OFFSET:%.*]] = lshr i64 [[X]], 2
|
||||
+; CHECK-NEXT: [[SEL_FROZEN:%.*]] = freeze i8 [[Z]]
|
||||
+; CHECK-NEXT: [[CMP:%.*]] = icmp slt i8 [[SEL_FROZEN]], 0
|
||||
+; CHECK-NEXT: br i1 [[CMP]], label %[[SELECT_END:.*]], label %[[SELECT_FALSE_SINK:.*]]
|
||||
+; CHECK: [[SELECT_FALSE_SINK]]:
|
||||
+; CHECK-NEXT: [[SMIN:%.*]] = tail call i8 @llvm.smin.i8(i8 [[Y]], i8 0)
|
||||
+; CHECK-NEXT: br label %[[SELECT_END]]
|
||||
+; CHECK: [[SELECT_END]]:
|
||||
+; CHECK-NEXT: [[SEL:%.*]] = phi i8 [ 0, %[[ENTRY]] ], [ [[SMIN]], %[[SELECT_FALSE_SINK]] ]
|
||||
+; CHECK-NEXT: [[SUNKADDR:%.*]] = getelementptr i8, ptr [[DST]], i64 [[OFFSET]]
|
||||
+; CHECK-NEXT: store i8 [[SEL]], ptr [[SUNKADDR]], align 1
|
||||
+; CHECK-NEXT: ret void
|
||||
+;
|
||||
+entry:
|
||||
+ %offset = lshr i64 %x, 2
|
||||
+ %gep.dst = getelementptr i8, ptr %dst, i64 %offset
|
||||
+ %smin = tail call i8 @llvm.smin.i8(i8 %y, i8 0)
|
||||
+ %cmp = icmp slt i8 %z, 0
|
||||
+ %sel = select i1 %cmp, i8 0, i8 %smin
|
||||
+ store i8 %sel, ptr %gep.dst, align 1
|
||||
+ ret void
|
||||
+}
|
||||
+
|
||||
+declare i8 @llvm.smin.i8(i8, i8) #0
|
||||
--
|
||||
2.50.1
|
||||
|
||||
@ -1,81 +0,0 @@
|
||||
From 6d5697f7cb4e933d2f176c46b7ac05a9cbaeb8b6 Mon Sep 17 00:00:00 2001
|
||||
From: Ulrich Weigand <ulrich.weigand@de.ibm.com>
|
||||
Date: Thu, 23 Jan 2025 19:11:18 +0100
|
||||
Subject: [PATCH] [SystemZ] Fix ICE with i128->i64 uaddo carry chain
|
||||
|
||||
We can only optimize a uaddo_carry via specialized instruction
|
||||
if the carry was produced by another uaddo(_carry) instruction;
|
||||
there is already a check for that.
|
||||
|
||||
However, i128 uaddo(_carry) use a completely different mechanism;
|
||||
they indicate carry in a vector register instead of the CC flag.
|
||||
Thus, we must also check that we don't mix those two - that check
|
||||
has been missing.
|
||||
|
||||
Fixes: https://github.com/llvm/llvm-project/issues/124001
|
||||
---
|
||||
.../Target/SystemZ/SystemZISelLowering.cpp | 12 ++++++----
|
||||
llvm/test/CodeGen/SystemZ/pr124001.ll | 23 +++++++++++++++++++
|
||||
2 files changed, 31 insertions(+), 4 deletions(-)
|
||||
create mode 100644 llvm/test/CodeGen/SystemZ/pr124001.ll
|
||||
|
||||
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
|
||||
index 4040ab6d4510..1fb31c26e20d 100644
|
||||
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
|
||||
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
|
||||
@@ -4708,15 +4708,19 @@ SDValue SystemZTargetLowering::lowerXALUO(SDValue Op,
|
||||
}
|
||||
|
||||
static bool isAddCarryChain(SDValue Carry) {
|
||||
- while (Carry.getOpcode() == ISD::UADDO_CARRY)
|
||||
+ while (Carry.getOpcode() == ISD::UADDO_CARRY &&
|
||||
+ Carry->getValueType(0) != MVT::i128)
|
||||
Carry = Carry.getOperand(2);
|
||||
- return Carry.getOpcode() == ISD::UADDO;
|
||||
+ return Carry.getOpcode() == ISD::UADDO &&
|
||||
+ Carry->getValueType(0) != MVT::i128;
|
||||
}
|
||||
|
||||
static bool isSubBorrowChain(SDValue Carry) {
|
||||
- while (Carry.getOpcode() == ISD::USUBO_CARRY)
|
||||
+ while (Carry.getOpcode() == ISD::USUBO_CARRY &&
|
||||
+ Carry->getValueType(0) != MVT::i128)
|
||||
Carry = Carry.getOperand(2);
|
||||
- return Carry.getOpcode() == ISD::USUBO;
|
||||
+ return Carry.getOpcode() == ISD::USUBO &&
|
||||
+ Carry->getValueType(0) != MVT::i128;
|
||||
}
|
||||
|
||||
// Lower UADDO_CARRY/USUBO_CARRY nodes.
|
||||
diff --git a/llvm/test/CodeGen/SystemZ/pr124001.ll b/llvm/test/CodeGen/SystemZ/pr124001.ll
|
||||
new file mode 100644
|
||||
index 000000000000..9cf630a55dd6
|
||||
--- /dev/null
|
||||
+++ b/llvm/test/CodeGen/SystemZ/pr124001.ll
|
||||
@@ -0,0 +1,23 @@
|
||||
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
|
||||
+; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
|
||||
+
|
||||
+define i64 @test(i128 %in) {
|
||||
+; CHECK-LABEL: test:
|
||||
+; CHECK: # %bb.0:
|
||||
+; CHECK-NEXT: larl %r1, .LCPI0_0
|
||||
+; CHECK-NEXT: vl %v0, 0(%r2), 3
|
||||
+; CHECK-NEXT: vl %v1, 0(%r1), 3
|
||||
+; CHECK-NEXT: vaccq %v0, %v0, %v1
|
||||
+; CHECK-NEXT: vlgvg %r1, %v0, 1
|
||||
+; CHECK-NEXT: la %r2, 1(%r1)
|
||||
+; CHECK-NEXT: br %r14
|
||||
+ %1 = tail call { i128, i1 } @llvm.uadd.with.overflow.i128(i128 %in, i128 1)
|
||||
+ %2 = extractvalue { i128, i1 } %1, 1
|
||||
+ %3 = zext i1 %2 to i64
|
||||
+ %4 = add i64 %3, 1
|
||||
+ ret i64 %4
|
||||
+}
|
||||
+
|
||||
+declare { i128, i1 } @llvm.uadd.with.overflow.i128(i128, i128) #0
|
||||
+
|
||||
+attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
|
||||
--
|
||||
2.48.1
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
From f028fc042ef2875a13c6abf3828626a313e4a8e6 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Fri, 1 Aug 2025 15:38:22 +0000
|
||||
Subject: [PATCH] clang: Add a hack to fix the offload build with the
|
||||
mtls-dialect option
|
||||
|
||||
---
|
||||
clang/lib/Driver/ToolChains/CommonArgs.cpp | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
|
||||
index 097d186ad8ea..0dc9e60f8428 100644
|
||||
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
|
||||
@@ -920,6 +920,9 @@ bool tools::isTLSDESCEnabled(const ToolChain &TC,
|
||||
} else if (Triple.isX86()) {
|
||||
SupportedArgument = V == "gnu" || V == "gnu2";
|
||||
EnableTLSDESC = V == "gnu2";
|
||||
+ } else if( Triple.isGPU()) {
|
||||
+ // HACK To fix the offload build.
|
||||
+ return false;
|
||||
} else {
|
||||
Unsupported = true;
|
||||
}
|
||||
--
|
||||
2.49.0
|
||||
|
||||
130
0002-BPF-Remove-unused-weak-symbol-__bpf_trap-166003.patch
Normal file
130
0002-BPF-Remove-unused-weak-symbol-__bpf_trap-166003.patch
Normal file
@ -0,0 +1,130 @@
|
||||
From be4fa19ecf95d94d3ef46be183d3d4b4ebb6bb47 Mon Sep 17 00:00:00 2001
|
||||
From: yonghong-song <yhs@fb.com>
|
||||
Date: Mon, 3 Nov 2025 11:11:47 -0800
|
||||
Subject: [PATCH] [BPF] Remove unused weak symbol __bpf_trap (#166003)
|
||||
|
||||
Nikita Popov reported an issue ([1]) where a dangling weak symbol
|
||||
__bpf_trap is in the final binary and this caused libbpf failing like
|
||||
below:
|
||||
|
||||
$ veristat -v ./t.o
|
||||
Processing 't.o'...
|
||||
libbpf: elf: skipping unrecognized data section(4) .eh_frame
|
||||
libbpf: elf: skipping relo section(5) .rel.eh_frame for section(4) .eh_frame
|
||||
libbpf: failed to find BTF for extern '__bpf_trap': -3
|
||||
Failed to open './t.o': -3
|
||||
|
||||
In llvm, the dag selection phase generates __bpf_trap in code. Later the
|
||||
UnreachableBlockElim pass removed __bpf_trap from the code, but
|
||||
__bpf_trap symbol survives in the symbol table.
|
||||
|
||||
Having a dangling __bpf_trap weak symbol is not good for old kernels as
|
||||
seen in the above veristat failure. Although users could use compiler
|
||||
flag `-mllvm -bpf-disable-trap-unreachable` to workaround the issue,
|
||||
this patch fixed the issue by removing the dangling __bpf_trap.
|
||||
|
||||
[1] https://github.com/llvm/llvm-project/issues/165696
|
||||
|
||||
(cherry picked from commit 8fd1bf2f8c9e6e7c4bc5f6915a9d52bb3672601b)
|
||||
---
|
||||
llvm/lib/Target/BPF/BPFAsmPrinter.cpp | 24 ++++++++++++++++++++
|
||||
llvm/lib/Target/BPF/BPFAsmPrinter.h | 1 +
|
||||
llvm/test/CodeGen/BPF/bpf_trap.ll | 32 +++++++++++++++++++++++++++
|
||||
3 files changed, 57 insertions(+)
|
||||
create mode 100644 llvm/test/CodeGen/BPF/bpf_trap.ll
|
||||
|
||||
diff --git a/llvm/lib/Target/BPF/BPFAsmPrinter.cpp b/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
|
||||
index 77dc4a75a7d6..b2a82040ee82 100644
|
||||
--- a/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
|
||||
+++ b/llvm/lib/Target/BPF/BPFAsmPrinter.cpp
|
||||
@@ -88,6 +88,16 @@ bool BPFAsmPrinter::doFinalization(Module &M) {
|
||||
}
|
||||
}
|
||||
|
||||
+ for (GlobalObject &GO : M.global_objects()) {
|
||||
+ if (!GO.hasExternalWeakLinkage())
|
||||
+ continue;
|
||||
+
|
||||
+ if (!SawTrapCall && GO.getName() == BPF_TRAP) {
|
||||
+ GO.eraseFromParent();
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return AsmPrinter::doFinalization(M);
|
||||
}
|
||||
|
||||
@@ -160,6 +170,20 @@ bool BPFAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
|
||||
}
|
||||
|
||||
void BPFAsmPrinter::emitInstruction(const MachineInstr *MI) {
|
||||
+ if (MI->isCall()) {
|
||||
+ for (const MachineOperand &Op : MI->operands()) {
|
||||
+ if (Op.isGlobal()) {
|
||||
+ if (const GlobalValue *GV = Op.getGlobal())
|
||||
+ if (GV->getName() == BPF_TRAP)
|
||||
+ SawTrapCall = true;
|
||||
+ } else if (Op.isSymbol()) {
|
||||
+ if (const MCSymbol *Sym = Op.getMCSymbol())
|
||||
+ if (Sym->getName() == BPF_TRAP)
|
||||
+ SawTrapCall = true;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
BPF_MC::verifyInstructionPredicates(MI->getOpcode(),
|
||||
getSubtargetInfo().getFeatureBits());
|
||||
|
||||
diff --git a/llvm/lib/Target/BPF/BPFAsmPrinter.h b/llvm/lib/Target/BPF/BPFAsmPrinter.h
|
||||
index 0cfb2839c8ff..60a285ea2b7d 100644
|
||||
--- a/llvm/lib/Target/BPF/BPFAsmPrinter.h
|
||||
+++ b/llvm/lib/Target/BPF/BPFAsmPrinter.h
|
||||
@@ -39,6 +39,7 @@ public:
|
||||
private:
|
||||
BTFDebug *BTF;
|
||||
TargetMachine &TM;
|
||||
+ bool SawTrapCall = false;
|
||||
|
||||
const BPFTargetMachine &getBTM() const;
|
||||
};
|
||||
diff --git a/llvm/test/CodeGen/BPF/bpf_trap.ll b/llvm/test/CodeGen/BPF/bpf_trap.ll
|
||||
new file mode 100644
|
||||
index 000000000000..ab8df5ff7cb0
|
||||
--- /dev/null
|
||||
+++ b/llvm/test/CodeGen/BPF/bpf_trap.ll
|
||||
@@ -0,0 +1,32 @@
|
||||
+; RUN: llc < %s | FileCheck %s
|
||||
+;
|
||||
+target triple = "bpf"
|
||||
+
|
||||
+define i32 @test(i8 %x) {
|
||||
+entry:
|
||||
+ %0 = and i8 %x, 3
|
||||
+ switch i8 %0, label %default.unreachable4 [
|
||||
+ i8 0, label %return
|
||||
+ i8 1, label %sw.bb1
|
||||
+ i8 2, label %sw.bb2
|
||||
+ i8 3, label %sw.bb3
|
||||
+ ]
|
||||
+
|
||||
+sw.bb1: ; preds = %entry
|
||||
+ br label %return
|
||||
+
|
||||
+sw.bb2: ; preds = %entry
|
||||
+ br label %return
|
||||
+
|
||||
+sw.bb3: ; preds = %entry
|
||||
+ br label %return
|
||||
+
|
||||
+default.unreachable4: ; preds = %entry
|
||||
+ unreachable
|
||||
+
|
||||
+return: ; preds = %entry, %sw.bb3, %sw.bb2, %sw.bb1
|
||||
+ %retval.0 = phi i32 [ 12, %sw.bb1 ], [ 43, %sw.bb2 ], [ 54, %sw.bb3 ], [ 32, %entry ]
|
||||
+ ret i32 %retval.0
|
||||
+}
|
||||
+
|
||||
+; CHECK-NOT: __bpf_trap
|
||||
--
|
||||
2.50.1
|
||||
|
||||
15
gating.yaml
15
gating.yaml
@ -7,9 +7,22 @@ decision_contexts:
|
||||
- bodhi_update_push_stable_critpath
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./tests/build-gating.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./tests/lld-alternatives.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.installability.functional}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
# The version number here should match the current rawhide release.
|
||||
- fedora-44
|
||||
decision_contexts:
|
||||
- bodhi_update_push_stable
|
||||
- bodhi_update_push_stable_critpath
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.rpmdeplint.functional}
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build./tests/kernel-ark-build.functional}
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
|
||||
@ -102,3 +102,29 @@ yWfeofTJ7PhKzoXM2Y/rRFoM5gNh1RVA19ngLT5Jwiof8fPZvHJ/9ZkHn+O7eMNm
|
||||
m5++gYza3pnn2/PoGpGGAKok+sfJiq5Tb7RUefyJTeZiyTZ/XJrA
|
||||
=tMzl
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mDMEaMgtRhYJKwYBBAHaRw8BAQdA4NRjJPhVd56sOM+QmTbZKkRT3bYbgg6+Bxed
|
||||
CELeGp+0JUN1bGxlbiBSaG9kZXMgPGN1bGxlbi5yaG9kZXNAYXJtLmNvbT6IkwQT
|
||||
FgoAOxYhBHEEbR6cZla91hFxhz6Dur9KT56FBQJoyC1GAhsDBQsJCAcCAiICBhUK
|
||||
CQgLAgQWAgMBAh4HAheAAAoJED6Dur9KT56FkVwA/RLNMBHrjXoAKpRm1iIjiC6w
|
||||
gLRqGOnj1qAqPqgntMmmAQCQ2lGpw46rvh88ng84IGsRF0JlTAYb6SR/YYNsQyah
|
||||
Arg4BGjILUYSCisGAQQBl1UBBQEBB0B48hCLw13kduwibGDGoIax0BIa+f66IUC+
|
||||
HhNlucsjbgMBCAeIeAQYFgoAIBYhBHEEbR6cZla91hFxhz6Dur9KT56FBQJoyC1G
|
||||
AhsMAAoJED6Dur9KT56FVssBAO1lL/S2cU65XFHgbjc6crwljDrD7PYbxBA7hDpi
|
||||
pC4ZAP98rK1hGQ5wxpeiJ0heZ8zhpdUwEeymIDBaIcwgrJRFBQ==
|
||||
=HcEB
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mDMEaMg2hBYJKwYBBAHaRw8BAQdA2J814YnhPQSdsyjwx8VxZ7AitqCnns9lzvkx
|
||||
HX9lWMW0JERvdWdsYXMgWXVuZyA8ZG91Z2xhcy55dW5nQHNvbnkuY29tPoiTBBMW
|
||||
CgA7FiEE/7M2iYDz5rtXNxRaMWxW0GTKy6UFAmjINoQCGwMFCwkIBwICIgIGFQoJ
|
||||
CAsCBBYCAwECHgcCF4AACgkQMWxW0GTKy6XjYgEApJ7p+o7EAeaaOdO2f440KDfg
|
||||
t7haaBLaxr5fiaSKjkYA+gLDxWOh39Y84upf23qMmpSTZ3SK5LvJtBTVtV7AEX0B
|
||||
uDgEaMg2hBIKKwYBBAGXVQEFAQEHQL3CL6jHZAakhtLLj2Ks34u7ItY/7USl/bYk
|
||||
f/+mZTJMAwEIB4h4BBgWCgAgFiEE/7M2iYDz5rtXNxRaMWxW0GTKy6UFAmjINoQC
|
||||
GwwACgkQMWxW0GTKy6VTOgEArDn9bg58W7bfZfVfneJJbIeICEf3NN9IovbRbAOB
|
||||
ax0A/RxtrG4qowLlo907vb25ITOa1hBoheSV2wNoDaDUhFEF
|
||||
=JQ8u
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
2
sources
2
sources
@ -1,2 +1,4 @@
|
||||
SHA512 (llvm-project-20.1.8.src.tar.xz) = f330e72e6a1da468569049437cc0ba7a41abb816ccece7367189344f7ebfef730f4788ac7af2bef0aa8a49341c15ab1d31e941ffa782f264d11fe0dc05470773
|
||||
SHA512 (llvm-project-21.1.6.src.tar.xz.sig) = 637cc9f778f8303e80985469c3102573a9cf6264093b1a83fb494e34b5cb444f76cbb7d6d497d44b05250d56e25ec27dd9df685e0b78b23bb71e4bcd05a8facf
|
||||
SHA512 (llvm-project-21.1.6.src.tar.xz) = f9e6c84828e40cb0a7894258b07240468a9d555c11496a1725bf959444362277a90ea822eeb8c9b51b3b7fecd4dd0b213a28a2f2effefbf43efdd21084d10afc
|
||||
SHA512 (llvm-project-20.1.8.src.tar.xz.sig) = d74369bdb4d1b82775161ea53c9c5f3a23ce810f4df5ff617123023f9d8ce720e7d6ecc9e17f8ebd39fd9e7a9de79560abdf2ffe73bcb907a43148d43665d619
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
The tests for LLVM are in a separate repo:
|
||||
|
||||
* llvm: https://src.fedoraproject.org/tests/llvm.git/
|
||||
* llvm: https://gitlab.com/redhat/centos-stream/tests/llvm.git/
|
||||
|
||||
This directory should contain only fmf plans (such as build-gating.fmf) which import
|
||||
the tests from the tests repo. This can be done using the "url" parameter of the
|
||||
|
||||
@ -40,11 +40,10 @@ adjust:
|
||||
or distro == rhel-8
|
||||
|
||||
discover:
|
||||
- name: llvm-tests
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/llvm.git
|
||||
ref: main
|
||||
filter: "tag:-spoils-installation & tag:-not-in-default"
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/llvm.git
|
||||
ref: main
|
||||
filter: "tag:-spoils-installation & tag:-not-in-default"
|
||||
execute:
|
||||
how: tmt
|
||||
provision:
|
||||
|
||||
@ -8,7 +8,7 @@ adjust:
|
||||
enabled: false
|
||||
|
||||
discover:
|
||||
- name: lld-tests
|
||||
- name: lld-alternatives
|
||||
how: fmf
|
||||
url: https://gitlab.com/redhat/centos-stream/tests/llvm.git
|
||||
ref: main
|
||||
|
||||
Loading…
Reference in New Issue
Block a user