about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2016-09-03 17:41:08 -0700
committerGitHub <noreply@github.com>2016-09-03 17:41:08 -0700
commit1ca1de6b26ec4740e3f0e8bead7002589024bd14 (patch)
tree0354a4cf3e8befbd39dda472a6e57b0efc3c856b
parent70598e04f922a0f451f63cec4134bd28b31c6411 (diff)
parentf5c775274275fa34b068ddf802bd528f790f7af8 (diff)
downloadrust-1ca1de6b26ec4740e3f0e8bead7002589024bd14.tar.gz
rust-1ca1de6b26ec4740e3f0e8bead7002589024bd14.zip
Auto merge of #36124 - eddyb:fast-array-init, r=alexcrichton
Fix optimization regressions for operations on [x; n]-initialized arrays.

Fixes #35662 by using `!=` instead of `<` as the stop condition for `[x; n]` initialization loops.
Also included is https://github.com/eddyb/llvm/commit/cc2009f02d3b9a3c05be939978212e832310b3d6, a hack to run the GVN pass twice, another time after InstCombine.
This hack results in removal of redundant `memset` and `memcpy` calls (from loops over arrays).

cc @nrc Can we get performance numbers on this? Not sure if it regresses anything else.
-rw-r--r--src/librustc_trans/tvec.rs2
m---------src/llvm0
-rw-r--r--src/rustllvm/llvm-auto-clean-trigger2
3 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_trans/tvec.rs b/src/librustc_trans/tvec.rs
index 7e4719870cd..cf897fc5a15 100644
--- a/src/librustc_trans/tvec.rs
+++ b/src/librustc_trans/tvec.rs
@@ -52,7 +52,7 @@ pub fn slice_for_each<'blk, 'tcx, F>(bcx: Block<'blk, 'tcx>,
     let current = Phi(header_bcx, val_ty(start), &[start], &[bcx.llbb]);
 
     let keep_going =
-        ICmp(header_bcx, llvm::IntULT, current, end, DebugLoc::None);
+        ICmp(header_bcx, llvm::IntNE, current, end, DebugLoc::None);
     CondBr(header_bcx, keep_going, body_bcx.llbb, next_bcx.llbb, DebugLoc::None);
 
     let body_bcx = f(body_bcx, if zst { data_ptr } else { current });
diff --git a/src/llvm b/src/llvm
-Subproject eee68eafa7e8e4ce996b49f5551636639a6c331
+Subproject 16b79d01fd6d942cf3c9120b92df56b13ec9266
diff --git a/src/rustllvm/llvm-auto-clean-trigger b/src/rustllvm/llvm-auto-clean-trigger
index 67f8730c258..1080070d21a 100644
--- a/src/rustllvm/llvm-auto-clean-trigger
+++ b/src/rustllvm/llvm-auto-clean-trigger
@@ -1,4 +1,4 @@
 # If this file is modified, then llvm will be forcibly cleaned and then rebuilt.
 # The actual contents of this file do not matter, but to trigger a change on the
 # build bots then the contents should be changed so git updates the mtime.
-2016-08-23
+2016-08-30