diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/files/fix-build-with-llvm12.patch b/dynamic-layers/clang-layer/recipes-opencl/igc/files/fix-build-with-llvm12.patch new file mode 100644 index 00000000..fb29c940 --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/files/fix-build-with-llvm12.patch @@ -0,0 +1,29 @@ +The condition should be checking for <= 11 since the change is available +in LLVM12: +https://github.com/llvm/llvm-project/commit/322d0afd875df66b36e4810a2b95c20a8f22ab9b + +Upstream-Status: Submitted +Signed-off-by: Anuj Mittal + +diff --git a/IGC/VectorCompiler/lib/GenXCodeGen/GenXSimdCFRegion.cpp b/IGC/VectorCompiler/lib/GenXCodeGen/GenXSimdCFRegion.cpp +index 363d622c2..bbb04be30 100644 +--- a/IGC/VectorCompiler/lib/GenXCodeGen/GenXSimdCFRegion.cpp ++++ b/IGC/VectorCompiler/lib/GenXCodeGen/GenXSimdCFRegion.cpp +@@ -395,7 +395,7 @@ public: + return GenXIntrinsic::getGenXIntrinsicID(V) == + GenXIntrinsic::genx_all || + CI->getIntrinsicID() == +-#if LLVM_VERSION_MAJOR <= 12 ++#if LLVM_VERSION_MAJOR <= 11 + Intrinsic::experimental_vector_reduce_and; + #else + Intrinsic::vector_reduce_and; +@@ -408,7 +408,7 @@ public: + if (const CallInst *CI = dyn_cast(V)) + return GenXIntrinsic::getGenXIntrinsicID(V) == + GenXIntrinsic::genx_any || CI->getIntrinsicID() == +-#if LLVM_VERSION_MAJOR <= 12 ++#if LLVM_VERSION_MAJOR <= 11 + Intrinsic::experimental_vector_reduce_or; + #else + Intrinsic::vector_reduce_or; diff --git a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.12812.9.bb b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.12812.9.bb index 4cfe7133..e5a3f858 100644 --- a/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.12812.9.bb +++ b/dynamic-layers/clang-layer/recipes-opencl/igc/intel-graphics-compiler_1.0.12812.9.bb @@ -17,6 +17,7 @@ SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https;nam file://c707d1e2244aec988bdd5d2a7473ef3a32a5bac7.patch \ file://d1761dfc3ca6b54bac0ee213389a65f84d2aa9b7.patch \ file://e09e752949e7af0231884d1b11ea907e3e8b1611.patch \ + file://fix-build-with-llvm12.patch \ " SRC_URI:append:class-native = " file://0001-fix-tblgen.patch"