automatic version update by autodist [release 1.24.0-1mamba;Sun May 26 2024]
This commit is contained in:
parent
15f0781892
commit
56c23b4f16
@ -1,102 +0,0 @@
|
||||
From c72af29f0bd82678918b941654aff892fbd7dc8a Mon Sep 17 00:00:00 2001
|
||||
From: Aleksei Nurmukhametov <aleksei.nurmukhametov@intel.com>
|
||||
Date: Thu, 29 Feb 2024 08:59:44 -0800
|
||||
Subject: [PATCH] llvm_patches: add x86-isel fix
|
||||
|
||||
This backported patch fixes generation of redundant vmovd, vpinsrd
|
||||
instructions.
|
||||
|
||||
Test case added as XFAIL until LLVM rebuild in CI.
|
||||
---
|
||||
...auxShuffleMask-handle-fp-int-bitcast.patch | 40 +++++++++++++++++++
|
||||
tests/lit-tests/2777.ispc | 34 ++++++++++++++++
|
||||
2 files changed, 74 insertions(+)
|
||||
create mode 100644 llvm_patches/16_0_17_0-X86-getFauxShuffleMask-handle-fp-int-bitcast.patch
|
||||
create mode 100644 tests/lit-tests/2777.ispc
|
||||
|
||||
diff --git a/llvm_patches/16_0_17_0-X86-getFauxShuffleMask-handle-fp-int-bitcast.patch b/llvm_patches/16_0_17_0-X86-getFauxShuffleMask-handle-fp-int-bitcast.patch
|
||||
new file mode 100644
|
||||
index 0000000000..f197b35051
|
||||
--- /dev/null
|
||||
+++ b/llvm_patches/16_0_17_0-X86-getFauxShuffleMask-handle-fp-int-bitcast.patch
|
||||
@@ -0,0 +1,40 @@
|
||||
+# This patch is required to fix the issue #2777
|
||||
+From 7aa6ddfea210b6b114ac649c4d3219138e9cc52a Mon Sep 17 00:00:00 2001
|
||||
+From: Simon Pilgrim <llvm-dev@redking.me.uk>
|
||||
+Date: Thu, 29 Feb 2024 10:32:37 +0000
|
||||
+Subject: [PATCH] [X86] getFauxShuffleMask - handle
|
||||
+ insert_vector_elt(bitcast(extract_vector_elt(x))) shuffle patterns
|
||||
+
|
||||
+If the bitcast is between types of equal scalar size (i.e. fp<->int bitcasts), then we can safely peek through them
|
||||
+
|
||||
+Fixes #83289
|
||||
+---
|
||||
+ llvm/lib/Target/X86/X86ISelLowering.cpp | 7 +++++--
|
||||
+ 1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
+
|
||||
+diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
|
||||
+index e43b33eed470..22eea8b3d43d 100644
|
||||
+--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
|
||||
++++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
|
||||
+@@ -8477,13 +8477,16 @@ static bool getFauxShuffleMask(SDValue N, const APInt &DemandedElts,
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+- // Peek through trunc/aext/zext.
|
||||
++ // Peek through trunc/aext/zext/bitcast.
|
||||
+ // TODO: aext shouldn't require SM_SentinelZero padding.
|
||||
+ // TODO: handle shift of scalars.
|
||||
+ unsigned MinBitsPerElt = Scl.getScalarValueSizeInBits();
|
||||
+ while (Scl.getOpcode() == ISD::TRUNCATE ||
|
||||
+ Scl.getOpcode() == ISD::ANY_EXTEND ||
|
||||
+- Scl.getOpcode() == ISD::ZERO_EXTEND) {
|
||||
++ Scl.getOpcode() == ISD::ZERO_EXTEND ||
|
||||
++ (Scl.getOpcode() == ISD::BITCAST &&
|
||||
++ Scl.getScalarValueSizeInBits() ==
|
||||
++ Scl.getOperand(0).getScalarValueSizeInBits())) {
|
||||
+ Scl = Scl.getOperand(0);
|
||||
+ MinBitsPerElt =
|
||||
+ std::min<unsigned>(MinBitsPerElt, Scl.getScalarValueSizeInBits());
|
||||
+--
|
||||
+2.25.1
|
||||
+
|
||||
diff --git a/tests/lit-tests/2777.ispc b/tests/lit-tests/2777.ispc
|
||||
new file mode 100644
|
||||
index 0000000000..ec7656629a
|
||||
--- /dev/null
|
||||
+++ b/tests/lit-tests/2777.ispc
|
||||
@@ -0,0 +1,34 @@
|
||||
+// RUN: %{ispc} %s --target=avx2-i32x8 --emit-asm -o - | FileCheck %s
|
||||
+
|
||||
+// REQUIRES: X86_ENABLED && LLVM_16_0+
|
||||
+
|
||||
+// XFAIL: *
|
||||
+
|
||||
+// CHECK-NOT: vmovd
|
||||
+// CHECK-NOT: vpinsrd
|
||||
+
|
||||
+struct FVector4f
|
||||
+{
|
||||
+ float V[4];
|
||||
+};
|
||||
+
|
||||
+// Extra vmovd, vpinsrd after 2x vmaxps
|
||||
+inline uniform FVector4f VectorMax(const uniform FVector4f& V1, const uniform FVector4f& V2)
|
||||
+{
|
||||
+ varying float S0, S1, Result;
|
||||
+ *((uniform FVector4f *uniform)&S0) = *((uniform FVector4f *uniform)&V1);
|
||||
+ *((uniform FVector4f *uniform)&S1) = *((uniform FVector4f *uniform)&V2);
|
||||
+
|
||||
+ Result = max(S0, S1);
|
||||
+
|
||||
+ return *((uniform FVector4f *uniform)&Result);
|
||||
+}
|
||||
+
|
||||
+export void foo(uniform float A[], uniform float B[])
|
||||
+{
|
||||
+
|
||||
+ uniform FVector4f *uniform pA = (uniform FVector4f *uniform)A;
|
||||
+ uniform FVector4f *uniform pB = (uniform FVector4f *uniform)B;
|
||||
+
|
||||
+ *pA = VectorMax(*pA, *pB);
|
||||
+}
|
@ -1,5 +1,5 @@
|
||||
Name: ispc
|
||||
Version: 1.23.0
|
||||
Version: 1.24.0
|
||||
Release: 1mamba
|
||||
Summary: Compiler for high-performance SIMD programming on the CPU
|
||||
Group: Development/Tools
|
||||
@ -8,7 +8,6 @@ Distribution: openmamba
|
||||
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
||||
URL: https://ispc.github.io/
|
||||
Source: https://github.com/ispc/ispc.git/v%{version}/ispc-%{version}.tar.bz2
|
||||
Patch0: ispc-1.23.0-upstream-add_x86-isel-fix.patch
|
||||
Patch1: ispc-1.23.0-llvm-18.1.patch
|
||||
License: BSD
|
||||
## AUTOBUILDREQ-BEGIN
|
||||
@ -45,8 +44,7 @@ This package contains libraries and header files for developing applications tha
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch 0 -p1 -b .upstream-add_x86-isel-fix
|
||||
%patch 1 -p1 -b .llvm-18.1
|
||||
#%patch 1 -p1 -b .llvm-18.1
|
||||
|
||||
%build
|
||||
%cmake
|
||||
@ -84,5 +82,8 @@ This package contains libraries and header files for developing applications tha
|
||||
%doc README.md
|
||||
|
||||
%changelog
|
||||
* Sun May 26 2024 Automatic Build System <autodist@openmamba.org> 1.24.0-1mamba
|
||||
- automatic version update by autodist
|
||||
|
||||
* Sat May 04 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 1.23.0-1mamba
|
||||
- package created using the webbuild interface
|
||||
|
Loading…
Reference in New Issue
Block a user