diff options
author | dim <dim@FreeBSD.org> | 2015-10-09 21:00:04 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-10-09 21:00:04 +0000 |
commit | fcb0c0cc8d6934f766070dc4dbb56bf42c4679db (patch) | |
tree | 497df4c61ce31d1817b80067bcb2f1c1eb948553 | |
parent | 7f2c12c33e82ee61c3cc32022ebc69ec4d44270e (diff) | |
download | FreeBSD-src-fcb0c0cc8d6934f766070dc4dbb56bf42c4679db.zip FreeBSD-src-fcb0c0cc8d6934f766070dc4dbb56bf42c4679db.tar.gz |
Add llvm patch corresponding to r289072.
-rw-r--r-- | contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff b/contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff new file mode 100644 index 0000000..da3e6b0 --- /dev/null +++ b/contrib/llvm/patches/patch-07-undo-llvm-r240144-iostream-sigbus.diff @@ -0,0 +1,50 @@ +Temporarily revert upstream llvm trunk r240144 (by Michael Zolotukhin): + + [SLP] Vectorize for all-constant entries. + +This should fix libc++'s iostream initialization SIGBUSing whenever the +global cout symbol is not aligned to 16 bytes. + +Introduced here: http://svnweb.freebsd.org/changeset/base/289072 + +Index: lib/Transforms/Vectorize/SLPVectorizer.cpp +=================================================================== +--- lib/Transforms/Vectorize/SLPVectorizer.cpp ++++ lib/Transforms/Vectorize/SLPVectorizer.cpp +@@ -1642,10 +1642,8 @@ bool BoUpSLP::isFullyVectorizableTinyTree() { + if (VectorizableTree.size() != 2) + return false; + +- // Handle splat and all-constants stores. +- if (!VectorizableTree[0].NeedToGather && +- (allConstant(VectorizableTree[1].Scalars) || +- isSplat(VectorizableTree[1].Scalars))) ++ // Handle splat stores. ++ if (!VectorizableTree[0].NeedToGather && isSplat(VectorizableTree[1].Scalars)) + return true; + + // Gathering cost would be too much for tiny trees. +Index: test/Transforms/SLPVectorizer/X86/tiny-tree.ll +=================================================================== +--- test/Transforms/SLPVectorizer/X86/tiny-tree.ll ++++ test/Transforms/SLPVectorizer/X86/tiny-tree.ll +@@ -153,19 +153,3 @@ define void @store_splat(float*, float) { + store float %1, float* %6, align 4 + ret void + } +- +- +-; CHECK-LABEL: store_const +-; CHECK: store <4 x i32> +-define void @store_const(i32* %a) { +-entry: +- %ptr0 = getelementptr inbounds i32, i32* %a, i64 0 +- store i32 10, i32* %ptr0, align 4 +- %ptr1 = getelementptr inbounds i32, i32* %a, i64 1 +- store i32 30, i32* %ptr1, align 4 +- %ptr2 = getelementptr inbounds i32, i32* %a, i64 2 +- store i32 20, i32* %ptr2, align 4 +- %ptr3 = getelementptr inbounds i32, i32* %a, i64 3 +- store i32 40, i32* %ptr3, align 4 +- ret void +-} |