Merge remote-tracking branch 'up/master' into master-riscv64

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
David Abdurachmanov 2019-08-22 19:53:57 -07:00
commit d359c22b89
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
19 changed files with 543 additions and 501 deletions

9
.gitignore vendored
View File

@ -41,3 +41,12 @@
/llvm-6.0.1rc2.src.tar.xz
/llvm-6.0.1.src.tar.xz
/llvm-7.0.0rc1.src.tar.xz
/llvm-7.0.0rc2.src.tar.xz
/llvm-7.0.0rc3.src.tar.xz
/llvm-7.0.0.src.tar.xz
/llvm-7.0.1.src.tar.xz
/llvm-8.0.0rc1.src.tar.xz
/llvm-8.0.0rc2.src.tar.xz
/llvm-8.0.0rc3.src.tar.xz
/llvm-8.0.0rc4.src.tar.xz
/llvm-8.0.0.src.tar.xz

View File

@ -1,44 +0,0 @@
From 974c288631ef8d05bf3a3f91b32bf38eae16e5c8 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Mon, 6 Mar 2017 13:55:55 +0000
Subject: [PATCH] CMake: Add LLVM_UTILS_INSTALL_DIR option
This is like the LLVM_TOOLS_INSTALL_DIR option, but for the utils
that are installed when the LLVM_INSTALL_UTILS. This option
defaults to 'bin' to remain consistent with the current behavior, but
distros may want to install these to libexec/llvm.
---
CMakeLists.txt | 3 +++
cmake/modules/AddLLVM.cmake | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58ee3cf..f93405c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -281,6 +281,9 @@ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name
set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
+set(LLVM_UTILS_INSTALL_DIR "bin" CACHE STRING "Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to 'bin')")
+mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
+
# They are used as destination of target generators.
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 7f7608c..0da8162 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -864,7 +864,7 @@ macro(add_llvm_utility name)
set_target_properties(${name} PROPERTIES FOLDER "Utils")
if( LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS )
install (TARGETS ${name}
- RUNTIME DESTINATION bin
+ RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR}
COMPONENT ${name})
if (NOT CMAKE_CONFIGURATION_TYPES)
add_custom_target(install-${name}
--
2.9.3

View File

@ -1,42 +0,0 @@
From af79e4116c4476153869e1fd4aa30c87d4c7c21e Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Mon, 15 May 2017 09:34:23 +0000
Subject: [PATCH] CMake: Fix docs-llvm-man target when clang+llvm is in the
same source tree
Summary:
This was broken by r302499. Configuring with -DLLVM_BUILD_DOCS=ON would
cause the docs-llvm-man target not to be created.
Reviewers: anemet, beanz
Reviewed By: anemet
Subscribers: llvm-commits, mgorny
Differential Revision: https://reviews.llvm.org/D33146
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303042 91177308-0d34-0410-b5e6-96231b3b80d8
---
cmake/modules/AddSphinxTarget.cmake | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
index c3a676d..4540c5c 100644
--- a/cmake/modules/AddSphinxTarget.cmake
+++ b/cmake/modules/AddSphinxTarget.cmake
@@ -1,9 +1,9 @@
# Create sphinx target
-if (LLVM_ENABLE_SPHINX AND NOT TARGET sphinx)
+if (LLVM_ENABLE_SPHINX)
message(STATUS "Sphinx enabled.")
find_package(Sphinx REQUIRED)
- if (LLVM_BUILD_DOCS)
+ if (LLVM_BUILD_DOCS AND NOT TARGET sphinx)
add_custom_target(sphinx ALL)
endif()
else()
--
1.8.3.1

View File

@ -1,47 +0,0 @@
From 2eb830fed5b813c5624e770c244eec61dacb04d7 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Mon, 9 Jul 2018 10:35:30 -0700
Subject: [PATCH] Don't run BV DAG Combine before legalization if it assumes
legal types
---
lib/Target/PowerPC/PPCISelLowering.cpp | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 26e9f13..f622b05 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -11790,10 +11790,15 @@ static SDValue combineBVOfVecSExt(SDNode *N, SelectionDAG &DAG) {
auto isSExtOfVecExtract = [&](SDValue Op) -> bool {
if (!Op)
return false;
- if (Op.getOpcode() != ISD::SIGN_EXTEND)
+ if (Op.getOpcode() != ISD::SIGN_EXTEND &&
+ Op.getOpcode() != ISD::SIGN_EXTEND_INREG)
return false;
+ // A SIGN_EXTEND_INREG might be fed by an ANY_EXTEND to produce a value
+ // of the right width.
SDValue Extract = Op.getOperand(0);
+ if (Extract.getOpcode() == ISD::ANY_EXTEND)
+ Extract = Extract.getOperand(0);
if (Extract.getOpcode() != ISD::EXTRACT_VECTOR_ELT)
return false;
@@ -11881,8 +11886,10 @@ SDValue PPCTargetLowering::DAGCombineBuildVector(SDNode *N,
return Reduced;
// If we're building a vector out of extended elements from another vector
- // we have P9 vector integer extend instructions.
- if (Subtarget.hasP9Altivec()) {
+ // we have P9 vector integer extend instructions. The code assumes legal
+ // input types (i.e. it can't handle things like v4i16) so do not run before
+ // legalization.
+ if (Subtarget.hasP9Altivec() && !DCI.isBeforeLegalize()) {
Reduced = combineBVOfVecSExt(N, DAG);
if (Reduced)
return Reduced;
--
1.8.3.1

View File

@ -1,28 +0,0 @@
From 5f7fd92155db77c7608e3a07e5dcfad1ec7bd4e4 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Fri, 16 Mar 2018 07:52:33 -0700
Subject: [PATCH] Filter out cxxflags not supported by clang
---
tools/llvm-config/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
index a0bd36c..4193b0e 100644
--- a/tools/llvm-config/CMakeLists.txt
+++ b/tools/llvm-config/CMakeLists.txt
@@ -34,7 +34,11 @@ set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
+STRING(REGEX REPLACE "-mcet" "" LLVM_CFLAGS ${LLVM_CFLAGS})
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CFLAGS ${LLVM_CFLAGS})
set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
+STRING(REGEX REPLACE "-mcet" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
set(LLVM_BUILD_SYSTEM cmake)
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
--
1.8.3.1

View File

@ -0,0 +1,29 @@
From eaa421d1f9c3748c550e2a91fcb134a3d2a8ebff Mon Sep 17 00:00:00 2001
From: Sanjin Sijaric <ssijaric@codeaurora.org>
Date: Fri, 18 Jan 2019 19:34:20 +0000
Subject: [PATCH] Fix the buildbot issue introduced by r351421
The EXPENSIVE_CHECK x86_64 Windows buildbot is failing due to this change. Fix
the map access.
llvm-svn: 351577
---
lib/MC/MCWin64EH.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/MC/MCWin64EH.cpp b/lib/MC/MCWin64EH.cpp
index 8bc1f08..3ef1514 100644
--- a/lib/MC/MCWin64EH.cpp
+++ b/lib/MC/MCWin64EH.cpp
@@ -522,7 +522,7 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info) {
if (MatchingEpilog) {
assert(EpilogInfo.find(MatchingEpilog) != EpilogInfo.end() &&
"Duplicate epilog not found");
- EpilogInfo[EpilogStart] = EpilogInfo[MatchingEpilog];
+ EpilogInfo[EpilogStart] = EpilogInfo.lookup(MatchingEpilog);
// Clear the unwind codes in the EpilogMap, so that they don't get output
// in the logic below.
EpilogInstrs.clear();
--
1.8.3.1

View File

@ -1,40 +1,20 @@
From f9e66a883e1fb748e6ac826fde188efaae249361 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Sat, 29 Apr 2017 02:03:23 +0000
Subject: [PATCH] CMake: Split static library exports into their own export
file
From 59c38a2216f4467b53970bb6b010bc4fe0b8d1d3 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
Date: Fri, 25 Jan 2019 17:32:54 +0000
Subject: [PATCH 1/2] [PATCH] Filter out cxxflags not supported by clang
Summary:
This is to better support distros which split the static libraries into
their own package.
The current problem is that any project the includes LLVMConfig.cmake
will fail to configure unless the static libraries are installed. This
is because LLVMConfig.cmake includes LLVMExports.cmake, which throws an
error if it can't find files linked to one of the exported targets.
This patch resolves the problem by putting the static library targets
into their own export file, LLVMStaticExports.cmake. This file
is optionally included by LLVMConfig.cmake, so distros can put this
new file in their static library package to make LLVMConfig.cmake
no longer depend on these libraries when they are not installed.
Reviewers: beanz, mgorny, chapuni
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32668
---
cmake/modules/AddLLVM.cmake | 6 +++++-
cmake/modules/CMakeLists.txt | 3 +++
cmake/modules/LLVMConfig.cmake.in | 2 ++
3 files changed, 10 insertions(+), 1 deletion(-)
tools/llvm-config/CMakeLists.txt | 4 ++++
4 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index fd5627e..78f106f 100644
index 4dbc0ddaf4f..c408377cd2e 100644
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -635,7 +635,11 @@ macro(add_llvm_library name)
@@ -664,7 +664,11 @@ macro(add_llvm_library name)
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
NOT LLVM_DISTRIBUTION_COMPONENTS)
@ -48,18 +28,18 @@ index fd5627e..78f106f 100644
endif()
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
index 6074e83..e9fcb11 100644
index f5cc0006fa0..6605dc729c2 100644
--- a/cmake/modules/CMakeLists.txt
+++ b/cmake/modules/CMakeLists.txt
@@ -91,6 +91,7 @@ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
@@ -97,6 +97,7 @@ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_TOOLS_INSTALL_DIR}")
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
+set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
configure_file(
LLVMConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LLVMConfig.cmake
@@ -107,6 +108,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
@@ -113,6 +114,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
if(llvm_has_exports)
install(EXPORT LLVMExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
COMPONENT cmake-exports)
@ -69,10 +49,10 @@ index 6074e83..e9fcb11 100644
install(FILES
diff --git a/cmake/modules/LLVMConfig.cmake.in b/cmake/modules/LLVMConfig.cmake.in
index 0772016..f471625 100644
index 7ca06381d90..44d042c9b11 100644
--- a/cmake/modules/LLVMConfig.cmake.in
+++ b/cmake/modules/LLVMConfig.cmake.in
@@ -78,6 +78,8 @@ if(NOT TARGET LLVMSupport)
@@ -84,6 +84,8 @@ if(NOT TARGET LLVMSupport)
set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")
include("@LLVM_CONFIG_EXPORTS_FILE@")
@llvm_config_include_buildtree_only_exports@
@ -81,6 +61,22 @@ index 0772016..f471625 100644
endif()
# By creating intrinsics_gen here, subprojects that depend on LLVM's
diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
index a7db17386fb..8a796d03b5a 100644
--- a/tools/llvm-config/CMakeLists.txt
+++ b/tools/llvm-config/CMakeLists.txt
@@ -42,7 +42,11 @@ set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
set(LLVM_CPPFLAGS "${LLVM_DEFINITIONS}")
set(LLVM_CFLAGS "${LLVM_C_STD_FLAG} ${LLVM_DEFINITIONS}")
+STRING(REGEX REPLACE "-mcet" "" LLVM_CFLAGS ${LLVM_CFLAGS})
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CFLAGS ${LLVM_CFLAGS})
set(LLVM_CXXFLAGS "${LLVM_CXX_STD_FLAG} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
+STRING(REGEX REPLACE "-mcet" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
set(LLVM_BUILD_SYSTEM cmake)
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
--
1.8.3.1
2.19.2

View File

@ -0,0 +1,44 @@
diff -ru llvm-8.0.0rc1.src.orig/cmake/modules/CMakeLists.txt llvm-8.0.0rc1.src/cmake/modules/CMakeLists.txt
--- llvm-8.0.0rc1.src.orig/cmake/modules/CMakeLists.txt 2019-02-12 11:32:02.370238762 +0000
+++ llvm-8.0.0rc1.src/cmake/modules/CMakeLists.txt 2019-02-13 08:40:39.263265812 +0000
@@ -94,7 +94,7 @@
set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
+set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_TOOLS_INSTALL_DIR}")
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
configure_file(
diff -ru llvm-8.0.0rc1.src.orig/tools/llvm-config/llvm-config.cpp llvm-8.0.0rc1.src/tools/llvm-config/llvm-config.cpp
--- llvm-8.0.0rc1.src.orig/tools/llvm-config/llvm-config.cpp 2019-02-12 11:32:00.617221180 +0000
+++ llvm-8.0.0rc1.src/tools/llvm-config/llvm-config.cpp 2019-02-12 11:34:27.817599362 +0000
@@ -269,7 +269,6 @@
// tree.
bool IsInDevelopmentTree;
enum { CMakeStyle, CMakeBuildModeStyle } DevelopmentTreeLayout;
- llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
std::string CurrentExecPrefix;
std::string ActiveObjRoot;
@@ -280,11 +279,15 @@
build_mode = CMAKE_CFG_INTDIR;
#endif
- // Create an absolute path, and pop up one directory (we expect to be inside a
- // bin dir).
- sys::fs::make_absolute(CurrentPath);
- CurrentExecPrefix =
- sys::path::parent_path(sys::path::parent_path(CurrentPath)).str();
+ // Create an absolute path, and pop up as much directory as in LLVM_TOOLS_INSTALL_DIR
+ {
+ llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
+ sys::fs::make_absolute(CurrentPath);
+ for (auto iter = sys::path::begin(LLVM_TOOLS_INSTALL_DIR), end = sys::path::end(LLVM_TOOLS_INSTALL_DIR); iter != end; ++iter) {
+ CurrentPath = sys::path::parent_path(CurrentPath).str();
+ }
+ CurrentExecPrefix = sys::path::parent_path(CurrentPath).str();
+ }
// Check to see if we are inside a development tree by comparing to possible
// locations (prefix style or CMake style).

View File

@ -1,79 +0,0 @@
From a481ab548d038c1dfd52ee211b997e2dd33ff5ae Mon Sep 17 00:00:00 2001
From: Hal Finkel <hfinkel@anl.gov>
Date: Wed, 6 Sep 2017 03:08:26 +0000
Subject: [PATCH] [PowerPC] Don't use xscvdpspn on the P7
xscvdpspn was not introduced until the P8, so don't use it on the P7. Fixes a
regression introduced in r288152.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312612 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/Target/PowerPC/PPCISelLowering.cpp | 9 ++++++---
test/CodeGen/PowerPC/fp-splat.ll | 27 +++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 3 deletions(-)
create mode 100644 test/CodeGen/PowerPC/fp-splat.ll
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 74dedaf..6295693 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -7463,9 +7463,11 @@ static SDValue BuildVSLDOI(SDValue LHS, SDValue RHS, unsigned Amt, EVT VT,
/// - The node is a "load-and-splat"
/// In all other cases, we will choose to keep the BUILD_VECTOR.
static bool haveEfficientBuildVectorPattern(BuildVectorSDNode *V,
- bool HasDirectMove) {
+ bool HasDirectMove,
+ bool HasP8Vector) {
EVT VecVT = V->getValueType(0);
- bool RightType = VecVT == MVT::v2f64 || VecVT == MVT::v4f32 ||
+ bool RightType = VecVT == MVT::v2f64 ||
+ (HasP8Vector && VecVT == MVT::v4f32) ||
(HasDirectMove && (VecVT == MVT::v2i64 || VecVT == MVT::v4i32));
if (!RightType)
return false;
@@ -7627,7 +7629,8 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
// lowered to VSX instructions under certain conditions.
// Without VSX, there is no pattern more efficient than expanding the node.
if (Subtarget.hasVSX() &&
- haveEfficientBuildVectorPattern(BVN, Subtarget.hasDirectMove()))
+ haveEfficientBuildVectorPattern(BVN, Subtarget.hasDirectMove(),
+ Subtarget.hasP8Vector()))
return Op;
return SDValue();
}
diff --git a/test/CodeGen/PowerPC/fp-splat.ll b/test/CodeGen/PowerPC/fp-splat.ll
new file mode 100644
index 0000000..9b1ab21
--- /dev/null
+++ b/test/CodeGen/PowerPC/fp-splat.ll
@@ -0,0 +1,27 @@
+; RUN: llc -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-P8 -check-prefix=CHECK
+; RUN: llc -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-P7 -check-prefix=CHECK
+
+define <4 x float> @test1(float %a) {
+entry:
+; CHECK-LABEL: test1
+ %vecins = insertelement <4 x float> undef, float %a, i32 0
+ %vecins1 = insertelement <4 x float> %vecins, float %a, i32 1
+ %vecins2 = insertelement <4 x float> %vecins1, float %a, i32 2
+ %vecins3 = insertelement <4 x float> %vecins2, float %a, i32 3
+ ret <4 x float> %vecins3
+; CHECK-P8: xscvdpspn
+; CHECK-P7-NOT: xscvdpspn
+; CHECK: blr
+}
+
+define <2 x double> @test2(double %a) {
+entry:
+; CHECK-LABEL: test2
+ %vecins = insertelement <2 x double> undef, double %a, i32 0
+ %vecins1 = insertelement <2 x double> %vecins, double %a, i32 1
+ ret <2 x double> %vecins1
+; CHECK-P8: xxspltd
+; CHECK-P7: xxspltd
+; CHECK: blr
+}
+
--
1.8.3.1

View File

@ -1,76 +0,0 @@
From 9c50cf0c6d8f0b11cd76a28cc4ef9bca6ef732e0 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 9 May 2017 01:41:28 +0000
Subject: [PATCH] Revert "Revert "CMake: Move sphinx detection into
AddSphinxTarget.cmake""
This reverts commit r302054.
Re-commit now that I have fixes for clang/lld.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302499 91177308-0d34-0410-b5e6-96231b3b80d8
---
cmake/config-ix.cmake | 10 ----------
cmake/modules/AddSphinxTarget.cmake | 13 +++++++++++++
docs/CMakeLists.txt | 2 +-
3 files changed, 14 insertions(+), 11 deletions(-)
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 0331d0f..de8e9bf 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -530,16 +530,6 @@ else()
message(STATUS "Doxygen disabled.")
endif()
-if (LLVM_ENABLE_SPHINX)
- message(STATUS "Sphinx enabled.")
- find_package(Sphinx REQUIRED)
- if (LLVM_BUILD_DOCS)
- add_custom_target(sphinx ALL)
- endif()
-else()
- message(STATUS "Sphinx disabled.")
-endif()
-
set(LLVM_BINDINGS "")
if(WIN32)
message(STATUS "Go bindings disabled.")
diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
index cfc7f38..c3a676d 100644
--- a/cmake/modules/AddSphinxTarget.cmake
+++ b/cmake/modules/AddSphinxTarget.cmake
@@ -1,3 +1,16 @@
+
+# Create sphinx target
+if (LLVM_ENABLE_SPHINX AND NOT TARGET sphinx)
+ message(STATUS "Sphinx enabled.")
+ find_package(Sphinx REQUIRED)
+ if (LLVM_BUILD_DOCS)
+ add_custom_target(sphinx ALL)
+ endif()
+else()
+ message(STATUS "Sphinx disabled.")
+endif()
+
+
# Handy function for creating the different Sphinx targets.
#
# ``builder`` should be one of the supported builders used by
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 6dff219..4437610 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -103,8 +103,8 @@ endif()
endif()
if (LLVM_ENABLE_SPHINX)
+ include(AddSphinxTarget)
if (SPHINX_FOUND)
- include(AddSphinxTarget)
if (${SPHINX_OUTPUT_HTML})
add_sphinx_target(html llvm)
endif()
--
1.8.3.1

12
gating.yaml Normal file
View File

@ -0,0 +1,12 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
rules:
- !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
rules:
- !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.package.test.functional.complete}

17
lit.fedora.cfg.py Normal file
View File

@ -0,0 +1,17 @@
config.llvm_tools_dir = '/usr/bin'
config.llvm_shlib_dir = '%(llvm_shlib_dir)s' % lit_config.params
if hasattr(config, 'host_triple'):
# This means we are running lit regression tests
# Regression tests write output to this directory, so we need to be able to specify
# a temp directory when invoking lit. e.g. lit -Dllvm_obj_root=/tmp/lit
config.llvm_obj_root = "%(llvm_obj_root)s" % lit_config.params
lit_config.load_config(config, '%(llvm_test_root)s/lit.cfg.py' % lit_config.params)
else:
# This means we are running lit unit tests
# For unit tests, llvm_obj_root is used to find the unit test binaries.
config.llvm_obj_root = '%(llvm_unittest_bindir)s' % lit_config.params
lit_config.load_config(config, '%(llvm_test_root)s/Unit/lit.cfg.py' % lit_config.params)

399
llvm.spec
View File

@ -1,5 +1,6 @@
# Components enabled if supported by target architecture:
%ifarch %ix86 x86_64
%define gold_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x
%ifarch %{gold_arches}
%bcond_without gold
%else
%bcond_with gold
@ -7,30 +8,13 @@
%global compat_build 0
%global llvm_bindir %{_libdir}/%{name}
%global maj_ver 7
%global build_llvm_bindir %{buildroot}%{_bindir}
%global llvm_libdir %{_libdir}/%{name}
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
%global maj_ver 8
%global min_ver 0
%global patch_ver 0
%global rc_ver 1
%ifarch s390x
%global llvm_targets SystemZ;BPF
%endif
%ifarch ppc64 ppc64le
%global llvm_targets PowerPC;AMDGPU;BPF
%endif
%ifarch %ix86 x86_64
%global llvm_targets X86;AMDGPU;NVPTX;BPF
%endif
%ifarch aarch64
%global llvm_targets AArch64;AMDGPU;BPF
%endif
%ifarch %{arm}
%global llvm_targets ARM;BPF
%endif
%ifarch riscv64
%global llvm_targets AMDGPU;BPF
%endif
#%%global rc_ver 4
%if 0%{?compat_build}
%global pkg_name llvm%{maj_ver}.%{min_ver}
@ -50,43 +34,51 @@
%global pkg_libdir %{install_libdir}
%endif
%global build_install_prefix %{buildroot}%{install_prefix}
%global build_pkgdocdir %{buildroot}%{_pkgdocdir}
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: 0.1.rc%{rc_ver}.0.riscv64%{?dist}
Release: 8%{?rc_ver:.rc%{rc_ver}}.0.riscv64%{?dist}.1
Summary: The Low Level Virtual Machine
License: NCSA
URL: http://llvm.org
Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src.tar.xz
Source1: run-lit-tests
Source2: lit.fedora.cfg.py
# recognize s390 as SystemZ when configuring build
Patch3: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
Patch7: 0001-Filter-out-cxxflags-not-supported-by-clang.patch
Patch5: 0001-PATCH-llvm-config.patch
Patch7: 0001-PATCH-Filter-out-cxxflags-not-supported-by-clang.patch
Patch8: 0001-Fix-the-buildbot-issue-introduced-by-r351421.patch
Patch10: 0001-Don-t-run-BV-DAG-Combine-before-legalization-if-it-a.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: zlib-devel
BuildRequires: libffi-devel
BuildRequires: libffi-devel
BuildRequires: ncurses-devel
BuildRequires: python3-sphinx
BuildRequires: python3-recommonmark
BuildRequires: multilib-rpm-config
%if %{with gold}
BuildRequires: binutils-devel
BuildRequires: binutils-devel
%endif
BuildRequires: libstdc++-static
# Enable extra functionality when run the LLVM JIT under valgrind.
BuildRequires: libstdc++-static
%ifarch %{valgrind_arches}
BuildRequires: valgrind-devel
# Enable extra functionality when run the LLVM JIT under valgrind.
BuildRequires: valgrind-devel
%endif
# LLVM's LineEditor library will use libedit if it is available.
BuildRequires: libedit-devel
BuildRequires: libedit-devel
# We need python3-devel for pathfix.py.
BuildRequires: python3-devel
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Provides: llvm(major) = %{maj_ver}
%description
LLVM is a compiler infrastructure designed for compile-time, link-time,
runtime, and idle-time optimization of programs from arbitrary programming
@ -100,8 +92,10 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
# app that requires the libLLVMLineEditor, so we need to make sure
# libedit-devel is available.
Requires: libedit-devel
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
Requires(post): %{_sbindir}/alternatives
Requires(postun): %{_sbindir}/alternatives
Provides: llvm-devel(major) = %{maj_ver}
%description devel
This package contains library and header files needed to develop new native
@ -123,21 +117,50 @@ Shared libraries for the LLVM compiler infrastructure.
%package static
Summary: LLVM static libraries
Conflicts: %{name}-devel < 8
%description static
Static libraries for the LLVM compiler infrastructure.
%if !0%{?compat_build}
%package test
Summary: LLVM regression tests
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: python3-lit
# The regression tests need gold.
Requires: binutils
# This is for llvm-config
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
# Bugpoint tests require gcc
Requires: gcc
Requires: findutils
Provides: llvm-test(major) = %{maj_ver}
%description test
LLVM regression tests.
%package googletest
Summary: LLVM's modified googletest sources
%description googletest
LLVM's modified googletest sources.
%endif
%prep
%autosetup -n llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src -p1
# Update config.guess to detect RISC-V (riscv64)
cp -f /usr/lib/rpm/redhat/config.guess ./cmake/config.guess
pathfix.py -i %{__python3} -pn \
test/BugPoint/compile-custom.ll.py \
tools/opt-viewer/*.py
%build
mkdir -p _build
cd _build
%ifarch s390 %{arm} %ix86 riscv64
%ifarch s390 s390x %{arm} %ix86 riscv64
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
@ -148,10 +171,17 @@ export LDFLAGS="${LDFLAGS} -latomic %{__global_ldflags}"
%endif
# force off shared libs as cmake macros turns it on.
#
# -DCMAKE_INSTALL_RPATH=";" is a workaround for llvm manually setting the
# rpath of libraries and binaries. llvm will skip the manual setting
# if CAMKE_INSTALL_RPATH is set to a value, but cmake interprets this value
# as nothing, so it sets the rpath to "" when installing.
%cmake .. -G Ninja \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
%ifarch s390 %{arm} %ix86 riscv64
-DCMAKE_INSTALL_RPATH=";" \
%ifarch s390 s390x %{arm} %ix86 riscv64
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
%endif
@ -163,10 +193,7 @@ export LDFLAGS="${LDFLAGS} -latomic %{__global_ldflags}"
%endif
%endif
\
-DLLVM_TARGETS_TO_BUILD="%{llvm_targets}" \
%ifarch riscv64
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="RISCV" \
%endif
-DLLVM_TARGETS_TO_BUILD=all \
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \
-DLLVM_ENABLE_ZLIB:BOOL=ON \
-DLLVM_ENABLE_FFI:BOOL=ON \
@ -191,7 +218,8 @@ export LDFLAGS="${LDFLAGS} -latomic %{__global_ldflags}"
-DLLVM_INSTALL_UTILS:BOOL=OFF \
%else
-DLLVM_INSTALL_UTILS:BOOL=ON \
-DLLVM_UTILS_INSTALL_DIR:PATH=%{buildroot}%{llvm_bindir} \
-DLLVM_UTILS_INSTALL_DIR:PATH=%{build_llvm_bindir} \
-DLLVM_TOOLS_INSTALL_DIR:PATH=bin \
%endif
\
-DLLVM_INCLUDE_DOCS:BOOL=ON \
@ -206,32 +234,96 @@ export LDFLAGS="${LDFLAGS} -latomic %{__global_ldflags}"
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
\
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
-DCMAKE_INSTALL_PREFIX=%{buildroot}%{install_prefix} \
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{buildroot}%{_pkgdocdir}/html \
-DCMAKE_INSTALL_PREFIX=%{build_install_prefix} \
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{build_pkgdocdir}/html \
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3
ninja -v
%install
cd _build
ninja -v install
ninja -C _build -v install
# FIXME: Patch upstream to not install this
rm %{buildroot}%{install_libdir}/TestPlugin.so
%if !0%{?compat_build}
# fix multi-lib
mv -v %{buildroot}%{_bindir}/llvm-config{,-%{__isa_bits}}
mkdir -p %{buildroot}/%{_bindir}
mv %{buildroot}/%{_bindir}/llvm-config %{buildroot}/%{_bindir}/llvm-config-%{__isa_bits}
# Fix some man pages
ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config-%{__isa_bits}.1
mv %{buildroot}%{_mandir}/man1/tblgen.1 %{buildroot}%{_mandir}/man1/llvm-tblgen.1
# Install binaries needed for lit tests
%global test_binaries FileCheck count lli-child-target llvm-PerfectShuffle llvm-isel-fuzzer llvm-opt-fuzzer not yaml-bench
for f in %{test_binaries}
do
install -m 0755 ./_build/bin/$f %{build_llvm_bindir}
done
%multilib_fix_c_header --file %{_includedir}/llvm/Config/llvm-config.h
# Install libraries needed for unittests
%if 0%{?__isa_bits} == 64
%global build_libdir _build/lib64
%else
%global build_libdir _build/lib
%endif
install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir}
%global install_srcdir %{buildroot}%{_datadir}/llvm/src
%global lit_cfg test/%{_arch}.site.cfg.py
%global lit_unit_cfg test/Unit/%{_arch}.site.cfg.py
%global lit_fedora_cfg %{_datadir}/llvm/lit.fedora.cfg.py
# Install gtest sources so clang can use them for gtest
install -d %{install_srcdir}
install -d %{install_srcdir}/utils/
cp -R utils/unittest %{install_srcdir}/utils/
# Generate lit config files. Strip off the last line that initiates the
# test run, so we can customize the configuration.
head -n -1 _build/test/lit.site.cfg.py >> %{lit_cfg}
head -n -1 _build/test/Unit/lit.site.cfg.py >> %{lit_unit_cfg}
# Install custom fedora config file
cp %{SOURCE2} %{buildroot}%{lit_fedora_cfg}
# Patch lit config files to load custom fedora config:
for f in %{lit_cfg} %{lit_unit_cfg}; do
echo "lit_config.load_config(config, '%{lit_fedora_cfg}')" >> $f
done
install -d %{buildroot}%{_libexecdir}/tests/llvm
install -m 0755 %{SOURCE1} %{buildroot}%{_libexecdir}/tests/llvm
# Install lit tests. We need to put these in a tarball otherwise rpm will complain
# about some of the test inputs having the wrong object file format.
install -d %{buildroot}%{_datadir}/llvm/
tar -czf %{install_srcdir}/test.tar.gz test/
# Install the unit test binaries
mkdir -p %{build_llvm_libdir}
cp -R _build/unittests %{build_llvm_libdir}/
rm -rf `find %{build_llvm_libdir} -iname 'cmake*'`
# Install libraries used for testing
install -m 0755 %{build_libdir}/BugpointPasses.so %{buildroot}%{_libdir}
install -m 0755 %{build_libdir}/LLVMHello.so %{buildroot}%{_libdir}
# Install test inputs for PDB tests
echo "%{_datadir}/llvm/src/unittests/DebugInfo/PDB" > %{build_llvm_libdir}/unittests/DebugInfo/PDB/llvm.srcdir.txt
mkdir -p %{buildroot}%{_datadir}/llvm/src/unittests/DebugInfo/PDB/
cp -R unittests/DebugInfo/PDB/Inputs %{buildroot}%{_datadir}/llvm/src/unittests/DebugInfo/PDB/
%else
# Add version suffix to binaries
mkdir -p %{buildroot}/%{_bindir}
for f in `ls %{buildroot}/%{install_bindir}/*`; do
filename=`basename $f`
ln -s %{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
for binary in %{build_llvm_bindir}/*
do
mv ${binary} ${binary}%{exec_suffix}
done
# Move header files
@ -240,7 +332,6 @@ ln -s ../../../%{install_includedir}/llvm %{buildroot}/%{pkg_includedir}/llvm
ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{pkg_includedir}/llvm-c
# Fix multi-lib
mv %{buildroot}%{_bindir}/llvm-config{%{exec_suffix},%{exec_suffix}-%{__isa_bits}}
%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h
# Create ld.so.conf.d entry
@ -251,22 +342,27 @@ EOF
# Add version suffix to man pages and move them to mandir.
mkdir -p %{buildroot}/%{_mandir}/man1
for f in `ls %{buildroot}%{install_prefix}/share/man/man1/*`; do
for f in `ls %{build_install_prefix}/share/man/man1/*`; do
filename=`basename $f | cut -f 1 -d '.'`
mv $f %{buildroot}%{_mandir}/man1/$filename%{exec_suffix}.1
done
# Remove opt-viewer, since this is just a compatibility package.
rm -Rf %{buildroot}%{install_prefix}/share/opt-viewer
rm -Rf %{build_install_prefix}/share/opt-viewer
%endif
%check
cd _build
ninja check-all || :
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%check
# TODO: Fix test failures on arm
ninja check-all -C _build || \
%ifarch %{arm}
:
%else
false
%endif
%ldconfig_scriptlets libs
%if !0%{?compat_build}
@ -275,21 +371,27 @@ ninja check-all || :
%postun devel
if [ $1 -eq 0 ]; then
%{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config-%{__isa_bits}
%{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config
fi
%endif
%files
%{_bindir}/*
%{_mandir}/man1/*.1.*
%if !0%{?compat_build}
%{llvm_bindir}
%exclude %{_bindir}/llvm-config-%{__isa_bits}
%exclude %{_mandir}/man1/llvm-config.1.*
%exclude %{_bindir}/not
%exclude %{_bindir}/count
%exclude %{_bindir}/yaml-bench
%exclude %{_bindir}/lli-child-target
%exclude %{_bindir}/llvm-isel-fuzzer
%exclude %{_bindir}/llvm-opt-fuzzer
%{_bindir}/*
%exclude %{_mandir}/man1/llvm-config*
%{_mandir}/man1/*
%{_datadir}/opt-viewer
%else
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%exclude %{pkg_bindir}/llvm-config
%{pkg_bindir}
%endif
@ -297,16 +399,13 @@ fi
%files libs
%{pkg_libdir}/libLLVM-%{maj_ver}.so
%if !0%{?compat_build}
%{_libdir}/BugpointPasses.so
%{_libdir}/LLVMHello.so
%if %{with gold}
%{_libdir}/LLVMgold.so
%endif
%{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
%{_libdir}/libLTO.so*
%else
%{pkg_libdir}/BugpointPasses.so
%{pkg_libdir}/LLVMHello.so
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
%if %{with gold}
%{_libdir}/%{name}/lib/LLVMgold.so
%endif
@ -314,11 +413,12 @@ fi
%{pkg_libdir}/libLTO.so*
%exclude %{pkg_libdir}/libLTO.so
%endif
%{pkg_libdir}/libOptRemarks.so*
%files devel
%if !0%{?compat_build}
%{_bindir}/llvm-config-%{__isa_bits}
%{_mandir}/man1/llvm-config.1.*
%{_mandir}/man1/llvm-config*
%{_includedir}/llvm
%{_includedir}/llvm-c
%{_libdir}/libLLVM.so
@ -343,15 +443,156 @@ fi
%files static
%if !0%{?compat_build}
%{_libdir}/*.a
%exclude %{_libdir}/libLLVMTestingSupport.a
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%else
%{_libdir}/%{name}/lib/*.a
%endif
%if !0%{?compat_build}
%files test
%{_libexecdir}/tests/llvm/
%{llvm_libdir}/unittests/
%{_datadir}/llvm/src/unittests
%{_datadir}/llvm/src/test.tar.gz
%{_datadir}/llvm/lit.fedora.cfg.py
%{_bindir}/not
%{_bindir}/count
%{_bindir}/yaml-bench
%{_bindir}/lli-child-target
%{_bindir}/llvm-isel-fuzzer
%{_bindir}/llvm-opt-fuzzer
%{_libdir}/BugpointPasses.so
%{_libdir}/LLVMHello.so
%files googletest
%{_datadir}/llvm/src/utils
%{_libdir}/libLLVMTestingSupport.a
%endif
%changelog
* Sun Aug 12 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 7.0.0-0.1.rc1.0.riscv64
* Thu Aug 22 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> - 8.0.0-8.1.0.riscv64
- Add support for RISC-V (riscv64)
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.0-8.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jul 17 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-8
- Add provides for the major version of sub-packages
* Fri May 17 2019 sguelton@redhat.com - 8.0.0-7
- Fix conflicts between llvm-static = 8 and llvm-dev < 8 around LLVMStaticExports.cmake
* Wed Apr 24 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-6
- Make sure we aren't passing -g on s390x
* Sat Mar 30 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-5
- Enable build rpath while keeping install rpath disabled
* Wed Mar 27 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-4
- Backport r351577 from trunk to fix ninja check failures
* Tue Mar 26 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-3
- Fix ninja check
* Fri Mar 22 2019 Tom Stellard <tstellar@redhat.com> - 8.0.0-2
- llvm-test fixes
* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1
- 8.0.0 final
* Fri Mar 15 2019 sguelton@redhat.com - 8.0.0-0.6.rc4
- Activate all backends (rhbz#1689031)
* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.5.rc4
- 8.0.0 Release candidate 4
* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.4.rc3
- Move some binaries to -test package, cleanup specfile
* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.3.rc3
- 8.0.0 Release candidate 3
* Fri Feb 22 2019 sguelton@redhat.com - 8.0.0-0.2.rc2
- 8.0.0 Release candidate 2
* Sat Feb 9 2019 sguelton@redhat.com - 8.0.0-0.1.rc1
- 8.0.0 Release candidate 1
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-2.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Jan 21 2019 Josh Stone <jistone@redhat.com> - 7.0.1-2
- Fix discriminators in metadata, rhbz#1668033
* Mon Dec 17 2018 sguelton@redhat.com - 7.0.1-1
- 7.0.1 release
* Tue Dec 04 2018 sguelton@redhat.com - 7.0.0-5
- Ensure rpmlint passes on specfile
* Sat Nov 17 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-4
- Install testing libraries for unittests
* Sat Oct 27 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-3
- Fix running unittests as not-root user
* Thu Sep 27 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-2
- Fixes for llvm-test package:
- Add some missing Requires
- Add --threads option to run-lit-tests script
- Set PATH so lit can find tools like count, not, etc.
- Don't hardcode tools directory to /usr/lib64/llvm
- Fix typo in yaml-bench define
- Only print information about failing tests
* Fri Sep 21 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-1
- 7.0.0 Release
* Thu Sep 13 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.15.rc3
- Disable rpath on install LLVM and related sub-projects
* Wed Sep 12 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.14.rc3
- Remove rpath from executables and libraries
* Tue Sep 11 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.13.rc3
- Re-enable arm and aarch64 targets on x86_64
* Mon Sep 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.12.rc3
- 7.0.0-rc3 Release
* Fri Sep 07 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.11.rc2
- Use python3 shebang for opt-viewewr scripts
* Thu Aug 30 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.10.rc2
- Drop all uses of python2 from lit tests
* Thu Aug 30 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.9.rc2
- Build the gold plugin on all supported architectures
* Wed Aug 29 2018 Kevin Fenzi <kevin@scrye.com> - 7.0.0-0.8.rc2
- Re-enable debuginfo to avoid 25x size increase.
* Tue Aug 28 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.7.rc2
- 7.0.0-rc2 Release
* Tue Aug 28 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.6.rc1
- Guard valgrind usage with valgrind_arches macro
* Thu Aug 23 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.5.rc1
- Package lit tests and googletest sources.
* Mon Aug 20 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.4.rc1
- Re-enable AMDGPU target on ARM rhbz#1618922
* Mon Aug 13 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.3.rc1
- Drop references to TestPlugin.so from cmake files
* Fri Aug 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.2.rc1
- Fixes for lit tests
* Fri Aug 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.1.rc1
- 7.0.0-rc1 Release
- Reduce number of enabled targets on all arches.

58
run-lit-tests Executable file
View File

@ -0,0 +1,58 @@
#!/bin/bash
usage() {
echo "usage: `basename $0` [OPTIONS]"
echo " --threads NUM The number of threads to use for running tests."
echo " --multilib-arch ARCH Use this option to test 32-bit libs/binaries on"
echo " 64-bit hosts."
}
threads_arg=''
while [ $# -gt 0 ]; do
case $1 in
--threads)
shift
threads_arg="--threads $1"
;;
--multilib-arch)
shift
ARCH=$1
;;
* )
echo "unknown option: $1"
echo ""
usage
exit 1
;;
esac
shift
done
set -xe
if [ -z "$ARCH" ]; then
ARCH=`rpm --eval '%_arch'`
fi
case $ARCH in
arm)
;&
i686)
LIB_DIR="/usr/lib/"
;;
*)
LIB_DIR="/usr/lib64/"
;;
esac
cd $(mktemp -d)
ln -s /usr/include include
tar -xzf /usr/share/llvm/src/test.tar.gz
ln -s $ARCH.site.cfg.py test/lit.site.cfg.py
ln -s $ARCH.site.cfg.py test/Unit/lit.site.cfg.py
lit -v -s $threads_arg test \
-Dllvm_obj_root=`pwd` \
-Dllvm_test_root=`pwd`/test \
-Dllvm_unittest_bindir=$LIB_DIR/llvm \
-Dllvm_shlib_dir=$LIB_DIR

View File

@ -1,70 +0,0 @@
From a6fa10c14649c18d299cddf3e823b032460cb6f5 Mon Sep 17 00:00:00 2001
From: Pirama Arumuga Nainar <pirama@google.com>
Date: Thu, 23 Mar 2017 16:47:47 +0000
Subject: [PATCH] Fix computeKnownBits for ARMISD::CMOV
Summary:
The true and false operands for the CMOV are operands 0 and 1.
ARMISelLowering.cpp::computeKnownBits was looking at operands 1 and 2
instead. This can cause CMOV instructions to be incorrectly folded into
BFI if value set by the CMOV is another CMOV, whose known bits are
computed incorrectly.
This patch fixes the issue and adds a test case.
Reviewers: kristof.beyls, jmolloy
Subscribers: llvm-commits, aemerson, srhines, rengolin
Differential Revision: https://reviews.llvm.org/D31265
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298624 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/Target/ARM/ARMISelLowering.cpp | 4 ++--
test/CodeGen/ARM/no-cmov2bfi.ll | 19 +++++++++++++++++++
2 files changed, 21 insertions(+), 2 deletions(-)
create mode 100644 test/CodeGen/ARM/no-cmov2bfi.ll
diff --git a/lib/Target/ARM/ARMISelLowering.cpp b/lib/Target/ARM/ARMISelLowering.cpp
index 4a227a3cd7b1..cf98e60c0657 100644
--- a/lib/Target/ARM/ARMISelLowering.cpp
+++ b/lib/Target/ARM/ARMISelLowering.cpp
@@ -10806,8 +10806,8 @@ static void computeKnownBits(SelectionDAG &DAG, SDValue Op, APInt &KnownZero,
if (Op.getOpcode() == ARMISD::CMOV) {
APInt KZ2(KnownZero.getBitWidth(), 0);
APInt KO2(KnownOne.getBitWidth(), 0);
- computeKnownBits(DAG, Op.getOperand(1), KnownZero, KnownOne);
- computeKnownBits(DAG, Op.getOperand(2), KZ2, KO2);
+ computeKnownBits(DAG, Op.getOperand(0), KnownZero, KnownOne);
+ computeKnownBits(DAG, Op.getOperand(1), KZ2, KO2);
KnownZero &= KZ2;
KnownOne &= KO2;
diff --git a/test/CodeGen/ARM/no-cmov2bfi.ll b/test/CodeGen/ARM/no-cmov2bfi.ll
new file mode 100644
index 000000000000..c8b512048905
--- /dev/null
+++ b/test/CodeGen/ARM/no-cmov2bfi.ll
@@ -0,0 +1,19 @@
+; RUN: llc < %s -mtriple=thumbv7 | FileCheck --check-prefix=CHECK-NOBFI %s
+
+declare zeroext i1 @dummy()
+
+define i8 @test(i8 %a1, i1 %c) {
+; CHECK-NOBFI-NOT: bfi
+; CHECK-NOBFI: bl dummy
+; CHECK-NOBFI: cmp r0, #0
+; CHECK-NOBFI: it ne
+; CHECK-NOBFI: orrne [[REG:r[0-9]+]], [[REG]], #8
+; CHECK-NOBFI: mov r0, [[REG]]
+
+ %1 = and i8 %a1, -9
+ %2 = select i1 %c, i8 %1, i8 %a1
+ %3 = tail call zeroext i1 @dummy()
+ %4 = or i8 %2, 8
+ %ret = select i1 %3, i8 %4, i8 %2
+ ret i8 %ret
+}
--
2.9.3

View File

@ -1 +1 @@
SHA512 (llvm-7.0.0rc1.src.tar.xz) = 9fe5de3b373e3e9f32b81ac920dfbb6fd6a03118f0c1e9c2b6d93a0a0742c122d5c08e97c71262a7c273badb1d336b813143c1055d7c49c22394151a1520e064
SHA512 (llvm-8.0.0.src.tar.xz) = 1602343b451b964f5d8c2d6b0654d89384c80d45883498c5f0e2f4196168dd4a1ed2a4dadb752076020243df42ffe46cb31d82ffc145d8e5874163cbb9686a1f

1
tests/.fmf/version Normal file
View File

@ -0,0 +1 @@
1

5
tests/provision.fmf Normal file
View File

@ -0,0 +1,5 @@
---
standard-inventory-qcow2:
qemu:
m: 2G

16
tests/tests.yml Normal file
View File

@ -0,0 +1,16 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
required_packages:
- llvm-test
- rust
- cargo
tests:
- regression-tests:
dir: ./
run: /usr/libexec/tests/llvm/run-lit-tests --threads 1
- rust-sanity:
dir: ./
run: cargo new hello && cd hello && cargo run