Skip to content

Commit 5e66887

Browse files
committed
Auto merge of #46739 - arielb1:simple-loops, r=nikomatsakis
[needs perf run] Try to improve LLVM pass ordering Fixes #45466
2 parents 8e7a609 + 6163df4 commit 5e66887

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

src/llvm

src/rustllvm/llvm-rebuild-trigger

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# If this file is modified, then llvm will be (optionally) cleaned and then rebuilt.
22
# The actual contents of this file do not matter, but to trigger a change on the
33
# build bots then the contents should be changed so git updates the mtime.
4-
2017-11-07
4+
2017-11-08

src/test/codegen/issue-45466.rs

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// min-llvm-version 4.0
12+
// compile-flags: -O
13+
14+
#![crate_type="rlib"]
15+
16+
// CHECK-LABEL: @memzero
17+
// CHECK-NOT: store
18+
// CHECK: call void @llvm.memset
19+
// CHECK-NOT: store
20+
#[no_mangle]
21+
pub fn memzero(data: &mut [u8]) {
22+
for i in 0..data.len() {
23+
data[i] = 0;
24+
}
25+
}

0 commit comments

Comments
 (0)