Skip to content

Commit a261286

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:ff36411b23e5 into amd-gfx:958d87999604
Local branch amd-gfx 958d879 Merged main:8569465adf5e into amd-gfx:c81d641827d7 Remote branch main ff36411 [InstCombine] Use zexts nneg flag for icmp folding (llvm#70845)
2 parents 958d879 + ff36411 commit a261286

File tree

44 files changed

+443
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+443
-202
lines changed

libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ constexpr bool test() {
128128
{ // check that an iterator is returned with a borrowing range
129129
std::array in{1, 2, 3, 4};
130130
std::array<int, 4> out;
131-
std::same_as<std::ranges::in_out_result<int*, int*>> auto ret = std::ranges::copy(std::views::all(in), out.data());
132-
assert(ret.in == in.data() + 4);
131+
std::same_as<std::ranges::in_out_result<std::array<int, 4>::iterator, int*>> auto ret =
132+
std::ranges::copy(std::views::all(in), out.data());
133+
assert(ret.in == in.end());
133134
assert(ret.out == out.data() + 4);
134135
assert(in == out);
135136
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,9 @@ constexpr bool test() {
247247
{ // check that an iterator is returned with a borrowing range
248248
std::array in {1, 2, 3, 4};
249249
std::array<int, 4> out;
250-
std::same_as<std::ranges::in_out_result<int*, int*>> auto ret =
250+
std::same_as<std::ranges::in_out_result<std::array<int, 4>::iterator, int*>> auto ret =
251251
std::ranges::copy_backward(std::views::all(in), out.data() + out.size());
252-
assert(ret.in == in.data() + in.size());
252+
assert(ret.in == in.end());
253253
assert(ret.out == out.data());
254254
assert(in == out);
255255
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ constexpr void test_iterators() {
5353
{ // check that an empty range works
5454
std::array<int, 0> in;
5555
std::array<int, 0> out;
56-
auto ret = std::ranges::copy_n(In(in.data()), in.size(), Out(out.begin()));
56+
auto ret = std::ranges::copy_n(In(in.data()), in.size(), Out(out.data()));
5757
assert(base(ret.in) == in.data());
5858
assert(base(ret.out) == out.data());
5959
}
@@ -103,7 +103,7 @@ constexpr bool test() {
103103
};
104104
std::array<CopyOnce, 4> in {};
105105
std::array<CopyOnce, 4> out {};
106-
auto ret = std::ranges::copy_n(in.data(), in.size(), out.begin());
106+
auto ret = std::ranges::copy_n(in.begin(), in.size(), out.begin());
107107
assert(ret.in == in.end());
108108
assert(ret.out == out.end());
109109
assert(std::all_of(out.begin(), out.end(), [](const auto& e) { return e.copied; }));

libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ constexpr bool test() {
120120
{
121121
std::array<std::string, 10> a;
122122
auto ret = std::ranges::fill(a.begin(), a.end(), "long long string so no SSO");
123-
assert(ret == a.data() + a.size());
123+
assert(ret == a.end());
124124
assert(std::all_of(a.begin(), a.end(), [](auto& s) { return s == "long long string so no SSO"; }));
125125
}
126126
{
127127
std::array<std::string, 10> a;
128128
auto ret = std::ranges::fill(a, "long long string so no SSO");
129-
assert(ret == a.data() + a.size());
129+
assert(ret == a.end());
130130
assert(std::all_of(a.begin(), a.end(), [](auto& s) { return s == "long long string so no SSO"; }));
131131
}
132132
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ constexpr bool test() {
275275
{ // check that an iterator is returned with a borrowing range
276276
std::array in {1, 2, 3, 4};
277277
std::array<int, 4> out;
278-
std::same_as<std::ranges::in_out_result<int*, int*>> decltype(auto) ret =
278+
std::same_as<std::ranges::in_out_result<std::array<int, 4>::iterator, int*>> decltype(auto) ret =
279279
std::ranges::move(std::views::all(in), out.data());
280-
assert(ret.in == in.data() + 4);
280+
assert(ret.in == in.end());
281281
assert(ret.out == out.data() + 4);
282282
assert(in == out);
283283
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ constexpr bool test() {
261261
{ // check that an iterator is returned with a borrowing range
262262
std::array in {1, 2, 3, 4};
263263
std::array<int, 4> out;
264-
std::same_as<std::ranges::in_out_result<int*, int*>> auto ret =
264+
std::same_as<std::ranges::in_out_result<std::array<int, 4>::iterator, int*>> auto ret =
265265
std::ranges::move_backward(std::views::all(in), out.data() + out.size());
266-
assert(ret.in == in.data() + in.size());
266+
assert(ret.in == in.end());
267267
assert(ret.out == out.data());
268268
assert(in == out);
269269
}

libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ constexpr void test_one(std::array<int, N1> input, Pred pred, std::array<int, N2
132132
std::array<int, N3> out2;
133133

134134
std::same_as<ResultT> decltype(auto) result = std::ranges::partition_copy(
135-
Iter(begin), Sent(Iter(end)), OutIter1(out1.begin()), OutIter2(out2.begin()), pred);
135+
Iter(begin), Sent(Iter(end)), OutIter1(out1.data()), OutIter2(out2.data()), pred);
136136

137137
assert(base(result.in) == input.data() + input.size());
138138
assert(base(result.out1) == out1.data() + expected_true.size());
@@ -148,7 +148,7 @@ constexpr void test_one(std::array<int, N1> input, Pred pred, std::array<int, N2
148148
std::array<int, N3> out2;
149149

150150
std::same_as<ResultT> decltype(auto) result = std::ranges::partition_copy(
151-
range, OutIter1(out1.begin()), OutIter2(out2.begin()), pred);
151+
range, OutIter1(out1.data()), OutIter2(out2.data()), pred);
152152

153153
assert(base(result.in) == input.data() + input.size());
154154
assert(base(result.out1) == out1.data() + expected_true.size());

libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void test_one(std::array<int, N> in, std::size_t n, Gen gen) {
164164
auto begin = Iter(in.data());
165165
auto end = Sent(Iter(in.data() + in.size()));
166166
std::array<int, N> output;
167-
auto out = Out(output.begin());
167+
auto out = Out(output.data());
168168

169169
std::same_as<Out> decltype(auto) result = std::ranges::sample(
170170
std::move(begin), std::move(end), std::move(out), n, gen);
@@ -177,7 +177,7 @@ void test_one(std::array<int, N> in, std::size_t n, Gen gen) {
177177
auto begin = Iter(in.data());
178178
auto end = Sent(Iter(in.data() + in.size()));
179179
std::array<int, N> output;
180-
auto out = Out(output.begin());
180+
auto out = Out(output.data());
181181

182182
std::same_as<Out> decltype(auto) result = std::ranges::sample(std::ranges::subrange(
183183
std::move(begin), std::move(end)), std::move(out), n, gen);

libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ constexpr void test(Data<N, M> d) {
6464

6565
assert(base(ret.begin()) == input.data() + M);
6666
assert(base(ret.end()) == input.data() + N);
67-
assert(std::ranges::equal(input.begin(), base(ret.begin()), d.expected.begin(), d.expected.end()));
67+
assert(std::ranges::equal(input.data(), base(ret.begin()), d.expected.begin(), d.expected.end()));
6868
}
6969

7070
{ // range overload
@@ -75,7 +75,7 @@ constexpr void test(Data<N, M> d) {
7575

7676
assert(base(ret.begin()) == input.data() + M);
7777
assert(base(ret.end()) == input.data() + N);
78-
assert(std::ranges::equal(base(input.begin()), base(ret.begin()), d.expected.begin(), d.expected.end()));
78+
assert(std::ranges::equal(input.data(), base(ret.begin()), d.expected.begin(), d.expected.end()));
7979
}
8080
}
8181

libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove_if.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ constexpr void test(Data<N, M> d) {
8484

8585
assert(base(ret.begin()) == input.data() + M);
8686
assert(base(ret.end()) == input.data() + N);
87-
assert(std::ranges::equal(base(input.begin()), base(ret.begin()), d.expected.begin(), d.expected.end()));
87+
assert(std::ranges::equal(input.data(), base(ret.begin()), d.expected.begin(), d.expected.end()));
8888
}
8989
}
9090

0 commit comments

Comments
 (0)