diff --git a/0025-Backport-Simple-check-to-ignore-Inline-asm-fwait-insertion.patch b/0025-Backport-Simple-check-to-ignore-Inline-asm-fwait-insertion.patch new file mode 100644 index 0000000000000000000000000000000000000000..4d98b016187e4d525ad7d7af265cc56d1453139e --- /dev/null +++ b/0025-Backport-Simple-check-to-ignore-Inline-asm-fwait-insertion.patch @@ -0,0 +1,30 @@ +From cf9d549f2c40d548587f8d2d3cda0d32f13c9256 Mon Sep 17 00:00:00 2001 +From: Temperatureblock <102174059+Temperature-block@users.noreply.github.com> +Date: Mon, 12 Aug 2024 20:06:58 +0530 +Subject: [PATCH] Simple check to ignore Inline asm fwait insertion (#101686) + +Just a simple check to ignore Inline asm fwait insertion + +Fixes #101613 +--- + llvm/lib/Target/X86/X86InstrInfo.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/llvm/lib/Target/X86/X86InstrInfo.cpp b/llvm/lib/Target/X86/X86InstrInfo.cpp +index 10a0ccdcb023..e615fa09608c 100644 +--- a/llvm/lib/Target/X86/X86InstrInfo.cpp ++++ b/llvm/lib/Target/X86/X86InstrInfo.cpp +@@ -2947,6 +2947,11 @@ static bool isX87Reg(unsigned Reg) { + + /// check if the instruction is X87 instruction + bool X86::isX87Instruction(MachineInstr &MI) { ++ // Call and inlineasm defs X87 register, so we special case it here because ++ // otherwise calls are incorrectly flagged as x87 instructions ++ // as a result. ++ if (MI.isInlineAsm()) ++ return false; + for (const MachineOperand &MO : MI.operands()) { + if (!MO.isReg()) + continue; +-- +Gitee diff --git a/llvm.spec b/llvm.spec index 313c70365439befc3818faed6f776964fd0a1a12..102beded42cc70e18132271c557ce6b47a32eab4 100644 --- a/llvm.spec +++ b/llvm.spec @@ -44,7 +44,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 19 +Release: 20 Summary: The Low Level Virtual Machine License: NCSA @@ -79,6 +79,7 @@ Patch21: 0021-Add-BiSheng-Autotuner-support-for-LLVM-compiler.patch Patch22: 0022-Prevent-environment-variables-from-exceeding-NAME_MA.patch Patch23: 0023-AArch64-Support-HiSilicon-s-HIP09-Processor.patch Patch24: 0024-Backport-LoongArch-fix-and-add-some-new-support.patch +Patch25: 0025-Backport-Simple-check-to-ignore-Inline-asm-fwait-insertion.patch BuildRequires: binutils-devel BuildRequires: cmake @@ -375,6 +376,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C ./_build %{install_includedir}/llvm-gmock %changelog +* Mon Nov 18 2024 liyunfei - 17.0.6-20 +- [Backport] Simple check to ignore Inline asm fwait insertion + * Mon Sep 23 2024 zhanglimin - 17.0.6-19 - [LoongArch] Backport some new support