[arch-commits] Commit in intel-graphics-compiler/trunk (2 files)
Bruno Pagani
archange at gemini.archlinux.org
Fri Jul 8 13:35:07 UTC 2022
Date: Friday, July 8, 2022 @ 13:35:07
Author: archange
Revision: 1248683
Backport fix for some failures
Added:
intel-graphics-compiler/trunk/fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch
Modified:
intel-graphics-compiler/trunk/PKGBUILD
------------------------------------------------------+
PKGBUILD | 9 +-
fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch | 58 +++++++++++++++++
2 files changed, 64 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-07-08 13:27:21 UTC (rev 1248682)
+++ PKGBUILD 2022-07-08 13:35:07 UTC (rev 1248683)
@@ -4,7 +4,7 @@
pkgname=intel-graphics-compiler
epoch=1
pkgver=1.0.11485
-pkgrel=5
+pkgrel=6
pkgdesc="Intel Graphics Compiler for OpenCL"
arch=(x86_64)
url="https://github.com/intel/intel-graphics-compiler"
@@ -19,7 +19,8 @@
${pkgname}-update-raytracing-llvm14.patch::https://github.com/intel/intel-graphics-compiler/commit/d9535cc5c3e54b21d56c492d4e21cb13c80b9b7a.patch
${pkgname}-fix-getElementType.patch::https://github.com/intel/intel-graphics-compiler/commit/49f4d4e3e904179bf3a0b880732b92f8bfb2c64a.patch
${pkgname}-avoid-duplicate-entries.patch::https://github.com/intel/intel-graphics-compiler/commit/12332c1ee8e92238c919ad7c2aa36119259cb622.patch
- ${pkgname}-rework-kernel-metadata.patch::https://github.com/intel/intel-graphics-compiler/commit/6a13fa903f380e17378286a7cd43995b0ae162ad.patch)
+ ${pkgname}-rework-kernel-metadata.patch::https://github.com/intel/intel-graphics-compiler/commit/6a13fa903f380e17378286a7cd43995b0ae162ad.patch
+ fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch)
sha256sums=('a2bcb5a96c64691b21ab6b573a2b09dbe1354272281cf640f4d43ecd7753e25f'
'41ad4d72b4f5e00161d736c8f51c9a2421548d226511cd133143408fccc4bfd0'
'474d5ad34fa4c7c447190470346f8a944f105a11b1c95c2cded1fc28934fea48'
@@ -27,7 +28,8 @@
'16b77d68da5f832c67650135f673bf33ff70dd84ce9cf6fae502588b566ec6c9'
'43d94e5408142d401e35394add9ecdf2a283740a4cca7691fd3689626482006b'
'0c5fe7d98bf6b0f8e288b91fe139cfe7f0dcb89b55e6c471af9b0a026a94781a'
- '60b96639a7247f7bf86f451135881afd387f692e1a84c9a8695dc5a39ec3a3f2')
+ '60b96639a7247f7bf86f451135881afd387f692e1a84c9a8695dc5a39ec3a3f2'
+ '6652f7249f1c2b0aa3fa31837df8f494bad8badb8373988c91a15e08807c80a5')
prepare() {
patch -p1 -d ${pkgname}-igc-${pkgver} < fix-zlib-linking.patch
@@ -37,6 +39,7 @@
patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-fix-getElementType.patch
patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-avoid-duplicate-entries.patch
patch -p1 -d ${pkgname}-igc-${pkgver} < ${pkgname}-rework-kernel-metadata.patch
+ patch -p1 -d ${pkgname}-igc-${pkgver} < fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch
}
build() {
Added: fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch
===================================================================
--- fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch (rev 0)
+++ fix-AlignmentAnalysis-test-failures-on-LLVM-14.patch 2022-07-08 13:35:07 UTC (rev 1248683)
@@ -0,0 +1,58 @@
+From b73e51557b018b3aaf55b26db8020315560df55c Mon Sep 17 00:00:00 2001
+From: Artem Gindinson <artem.gindinson at intel.com>
+Date: Fri, 24 Jun 2022 08:15:02 +0000
+Subject: [PATCH] Fix AlignmentAnalysis test failures on LLVM 14
+
+Whenever `getAlignValue()` returned 64-bit `llvm::Value::MaximumAlignment`,
+previous type cast adjustments for LLVM 14 ended up truncating the result to 0,
+which in turn sparked incorrect comparison results. Adjust type casting to fix
+crashes/incorrect `align` values in the LIT tests.
+
+(cherry picked from commit 52109330c13213844ee7c7d471a8cc455a3517ee)
+---
+ .../AlignmentAnalysis/AlignmentAnalysis.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp
+index 8516e69af..21d07a58a 100644
+--- a/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp
++++ b/IGC/Compiler/Optimizer/OpenCLPasses/AlignmentAnalysis/AlignmentAnalysis.cpp
+@@ -181,17 +181,17 @@ auto AlignmentAnalysis::getAlignValue(Value* V) const
+ bool AlignmentAnalysis::processInstruction(llvm::Instruction* I)
+ {
+ // Get the currently known alignment of I.
+- unsigned int currAlign = getAlignValue(I);
++ alignment_t currAlign = getAlignValue(I);
+
+ // Compute the instruction's alignment
+ // using the alignment of the arguments.
+- unsigned int newAlign = 0;
++ alignment_t newAlign = 0;
+ if (I->getType()->isPointerTy())
+ {
+ // If a pointer is specifically given an 'align' field in the MD, use it.
+ MDNode* alignmentMD = I->getMetadata("align");
+ if (alignmentMD)
+- newAlign = (unsigned)mdconst::dyn_extract<ConstantInt>(alignmentMD->getOperand(0))->getZExtValue();
++ newAlign = (alignment_t)mdconst::dyn_extract<ConstantInt>(alignmentMD->getOperand(0))->getZExtValue();
+ }
+ if (!newAlign)
+ {
+@@ -208,7 +208,7 @@ bool AlignmentAnalysis::processInstruction(llvm::Instruction* I)
+
+ if (newAlign != currAlign)
+ {
+- m_alignmentMap[I] = newAlign;
++ m_alignmentMap[I] = (unsigned)newAlign;
+ return true;
+ }
+
+@@ -381,7 +381,7 @@ unsigned int AlignmentAnalysis::visitGetElementPtrInst(GetElementPtrInst& I)
+ {
+ Ty = GTI.getIndexedType();
+ unsigned int multiplier = int_cast<unsigned int>(m_DL->getTypeAllocSize(Ty));
+- offset = multiplier * getAlignValue(*op);
++ offset = multiplier * (unsigned)getAlignValue(*op);
+ }
+
+ // It's possible offset is not a power of 2, because struct fields
More information about the arch-commits
mailing list