[PATCH] D32565: Make test corrections necessary due to changing llvm::HashString
Scott Smith via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 26 15:29:59 PDT 2017
scott.smith created this revision.
Herald added a subscriber: klimek.
Certain test output is dependent on the order of the hash value computed by llvm::HashString. Correct those so https://reviews.llvm.org/D32509 can be committed.
Repository:
rL LLVM
https://reviews.llvm.org/D32565
Files:
test/CodeGen/target-features-error-2.c
test/CodeGen/target-features-error.c
test/SemaCXX/typo-correction-delayed.cpp
unittests/Tooling/CompilationDatabaseTest.cpp
Index: unittests/Tooling/CompilationDatabaseTest.cpp
===================================================================
--- unittests/Tooling/CompilationDatabaseTest.cpp
+++ unittests/Tooling/CompilationDatabaseTest.cpp
@@ -81,10 +81,10 @@
std::vector<std::string> expected_files;
SmallString<16> PathStorage;
- llvm::sys::path::native("//net/dir/file1", PathStorage);
- expected_files.push_back(PathStorage.str());
llvm::sys::path::native("//net/dir/file2", PathStorage);
expected_files.push_back(PathStorage.str());
+ llvm::sys::path::native("//net/dir/file1", PathStorage);
+ expected_files.push_back(PathStorage.str());
EXPECT_EQ(expected_files,
getAllFiles("[{\"directory\":\"//net/dir\","
"\"command\":\"command\","
Index: test/SemaCXX/typo-correction-delayed.cpp
===================================================================
--- test/SemaCXX/typo-correction-delayed.cpp
+++ test/SemaCXX/typo-correction-delayed.cpp
@@ -88,7 +89,10 @@
struct NestedNode {
NestedNode* Nest();
NestedNode* next();
- string text() const;
+ // Note, this test is dependent on the order in which identifiers are passed
+ // to the typo corrector, which is based on the hash function used. For
+ // consistency, I am making the next keyword the first identifier returned.
+ string eext() const;
};
void f(NestedNode *node) {
// There are two equidistant, usable corrections for Next: next and Nest
Index: test/CodeGen/target-features-error.c
===================================================================
--- test/CodeGen/target-features-error.c
+++ test/CodeGen/target-features-error.c
@@ -3,6 +3,5 @@
return a + 4;
}
int bar() {
- return foo(4); // expected-error {{always_inline function 'foo' requires target feature 'sse4.2', but would be inlined into function 'bar' that is compiled without support for 'sse4.2'}}
+ return foo(4); // expected-error {{always_inline function 'foo' requires target feature 'sse4.1', but would be inlined into function 'bar' that is compiled without support for 'sse4.1'}}
}
-
Index: test/CodeGen/target-features-error-2.c
===================================================================
--- test/CodeGen/target-features-error-2.c
+++ test/CodeGen/target-features-error-2.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o - -D NEED_SSE42
+// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o - -D NEED_SSE41
// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o - -D NEED_AVX_1
// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o - -D NEED_AVX_2
// RUN: %clang_cc1 %s -triple=x86_64-linux-gnu -S -verify -o - -D NEED_AVX_3
@@ -7,9 +7,12 @@
#define __MM_MALLOC_H
#include <x86intrin.h>
-#if NEED_SSE42
+// Really, this needs AVX, but because targetting AVX includes all the SSE features too, and
+// features are sorted by hash function, and we just return the first missing feature, then we end
+// up returning the subfeature sse4.1 instead of avx.
+#if NEED_SSE41
int baz(__m256i a) {
- return _mm256_extract_epi32(a, 3); // expected-error {{always_inline function '_mm256_extract_epi32' requires target feature 'sse4.2', but would be inlined into function 'baz' that is compiled without support for 'sse4.2'}}
+ return _mm256_extract_epi32(a, 3); // expected-error {{always_inline function '_mm256_extract_epi32' requires target feature 'sse4.1', but would be inlined into function 'baz' that is compiled without support for 'sse4.1'}}
}
#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32565.96835.patch
Type: text/x-patch
Size: 3535 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170426/6d3472d0/attachment.bin>
More information about the cfe-commits
mailing list