aboutsummaryrefslogtreecommitdiff
path: root/libcxx/test
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test')
-rw-r--r--libcxx/test/benchmarks/containers/associative/map.bench.cpp13
-rw-r--r--libcxx/test/benchmarks/containers/associative/unordered_map.bench.cpp13
-rw-r--r--libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp3
-rw-r--r--libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.objc.pass.mm3
4 files changed, 31 insertions, 1 deletions
diff --git a/libcxx/test/benchmarks/containers/associative/map.bench.cpp b/libcxx/test/benchmarks/containers/associative/map.bench.cpp
index bd664db..142229a 100644
--- a/libcxx/test/benchmarks/containers/associative/map.bench.cpp
+++ b/libcxx/test/benchmarks/containers/associative/map.bench.cpp
@@ -16,6 +16,19 @@
#include "../../GenerateInput.h"
#include "benchmark/benchmark.h"
+static void BM_map_find_string_literal(benchmark::State& state) {
+ std::map<std::string, int> map;
+ map.emplace("Something very very long to show a long string situation", 1);
+ map.emplace("Something Else", 2);
+
+ for (auto _ : state) {
+ benchmark::DoNotOptimize(map);
+ benchmark::DoNotOptimize(map.find("Something very very long to show a long string situation"));
+ }
+}
+
+BENCHMARK(BM_map_find_string_literal);
+
template <class K, class V>
struct support::adapt_operations<std::map<K, V>> {
using ValueType = typename std::map<K, V>::value_type;
diff --git a/libcxx/test/benchmarks/containers/associative/unordered_map.bench.cpp b/libcxx/test/benchmarks/containers/associative/unordered_map.bench.cpp
index 57adec2..d670c53 100644
--- a/libcxx/test/benchmarks/containers/associative/unordered_map.bench.cpp
+++ b/libcxx/test/benchmarks/containers/associative/unordered_map.bench.cpp
@@ -15,6 +15,19 @@
#include "../../GenerateInput.h"
#include "benchmark/benchmark.h"
+static void BM_map_find_string_literal(benchmark::State& state) {
+ std::unordered_map<std::string, int> map;
+ map.emplace("Something very very long to show a long string situation", 1);
+ map.emplace("Something Else", 2);
+
+ for (auto _ : state) {
+ benchmark::DoNotOptimize(map);
+ benchmark::DoNotOptimize(map.find("Something very very long to show a long string situation"));
+ }
+}
+
+BENCHMARK(BM_map_find_string_literal);
+
template <class K, class V>
struct support::adapt_operations<std::unordered_map<K, V>> {
using ValueType = typename std::unordered_map<K, V>::value_type;
diff --git a/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp b/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
index 056d6f6..2c3751a 100644
--- a/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.class/simd_unary.pass.cpp
@@ -12,6 +12,9 @@
// Assertion failed: N->getValueType(0) == MVT::v1i1 && "Expected v1i1 type"
// XFAIL: target=armv7-unknown-linux-gnueabihf
+// FIXME: This should work with -flax-vector-conversions=none
+// ADDITIONAL_COMPILE_FLAGS(clang): -flax-vector-conversions=integer
+
// <experimental/simd>
//
// [simd.class]
diff --git a/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.objc.pass.mm b/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.objc.pass.mm
index 05a6698..de38305 100644
--- a/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.objc.pass.mm
+++ b/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.objc.pass.mm
@@ -17,7 +17,8 @@
// out-of-the-box.
// REQUIRES: has-fobjc-arc && darwin
-// ADDITIONAL_COMPILE_FLAGS: -fobjc-arc
+// FIXME: including <Foundation/Foundation.h> seems to be currently broken with modules enabled
+// ADDITIONAL_COMPILE_FLAGS: -fobjc-arc -fno-modules
#include <cassert>
#include <exception>