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 d2bbb80e1d13410f342ed4b7e9b2db998097bd30..19cd5bafc2a4882c6b3124fd18fc7379cdbd50b9 100644 --- a/llvm.spec +++ b/llvm.spec @@ -46,7 +46,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 20 +Release: 21 Summary: The Low Level Virtual Machine License: NCSA @@ -81,6 +81,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 @@ -374,6 +375,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C %{__cmake %{install_includedir}/llvm-gmock %changelog +* Mon Nov 18 2024 liyunfei - 17.0.6-21 +- [Backport] Simple check to ignore Inline asm fwait insertion + * Wed Nov 06 2024 Funda Wang - 17.0.6-20 - adopt to new cmake macro