Skip to content

Commit

Permalink
rustc: Rebase LLVM on the 3.8 release branch
Browse files Browse the repository at this point in the history
This commit rebases our LLVM submodule on the most recent tip of the
`release_38` branch of LLVM. There's been a few fixes and this notably fixes the
assertion error in rust-lang#31702.
  • Loading branch information
alexcrichton committed Feb 16, 2016
1 parent 9658645 commit 97f7898
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/llvm
Submodule llvm updated 39 files
+18 −18 cmake/modules/AddLLVM.cmake
+10 −1 cmake/modules/LLVM-Config.cmake
+132 −16 docs/ReleaseNotes.rst
+1 −1 include/llvm/IR/IntrinsicsPowerPC.td
+0 −4 include/llvm/IR/Value.h
+0 −7 lib/Analysis/DemandedBits.cpp
+5 −0 lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
+42 −13 lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+3 −1 lib/IR/Value.cpp
+2 −2 lib/Target/AArch64/AArch64.td
+359 −0 lib/Target/AArch64/AArch64SchedM1.td
+8 −1 lib/Target/AMDGPU/SIRegisterInfo.cpp
+2 −2 lib/Target/ARM/ARMISelDAGToDAG.cpp
+7 −11 lib/Target/PowerPC/PPCFastISel.cpp
+1 −1 lib/Target/PowerPC/PPCInstrAltivec.td
+1 −1 lib/Target/SystemZ/SystemZISelLowering.cpp
+24 −41 lib/Target/X86/X86ISelLowering.cpp
+1 −1 lib/Transforms/InstCombine/InstCombineCompares.cpp
+2 −1 lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+17 −1 lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+0 −31 test/Analysis/DemandedBits/basic.ll
+33 −0 test/CodeGen/AMDGPU/spill-scavenge-offset.ll
+17 −0 test/CodeGen/ARM/shifter_operand.ll
+9 −0 test/CodeGen/PowerPC/fast-isel-ret.ll
+10 −0 test/CodeGen/PowerPC/inline-asm-s-modifier.ll
+9 −0 test/CodeGen/PowerPC/pr26193.ll
+136 −0 test/CodeGen/PowerPC/pr26356.ll
+8 −0 test/CodeGen/PowerPC/pr26381.ll
+26 −0 test/CodeGen/SystemZ/int-cmp-53.ll
+59 −4 test/CodeGen/X86/avx512-gather-scatter-intrin.ll
+62 −17 test/CodeGen/X86/setcc-lowering.ll
+102 −0 test/DebugInfo/X86/PR26148.ll
+12 −0 test/Transforms/InstCombine/icmp.ll
+30 −0 test/Transforms/InstCombine/insert-extract-shuffle.ll
+15 −0 test/Transforms/InstCombine/unpack-fca.ll
+0 −34 test/Transforms/LoopVectorize/AArch64/loop-vectorization-factors.ll
+1 −1 tools/CMakeLists.txt
+3 −4 utils/unittest/CMakeLists.txt
+3 −1 utils/unittest/UnitTestMain/CMakeLists.txt
2 changes: 1 addition & 1 deletion src/rustllvm/llvm-auto-clean-trigger
Original file line number Diff line number Diff line change
@@ -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.
2015-01-25
2016-02-16
26 changes: 26 additions & 0 deletions src/test/auxiliary/issue-31702-1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[derive(Copy)]
pub struct U256(pub [u64; 4]);

impl Clone for U256 {
fn clone(&self) -> U256 {
*self
}
}

impl U256 {
pub fn new(value: u64) -> U256 {
let mut ret = [0; 4];
ret[0] = value;
U256(ret)
}
}
30 changes: 30 additions & 0 deletions src/test/auxiliary/issue-31702-2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// compile-flags: -g

extern crate issue_31702_1;

use std::collections::HashMap;
use issue_31702_1::U256;

pub struct Ethash {
engine_params: for<'a> fn() -> Option<&'a Vec<u8>>,
u256_params: HashMap<String, U256>,
}

impl Ethash {
pub fn u256_param(&mut self, name: &str) -> U256 {
let engine = self.engine_params;
*self.u256_params.entry(name.to_owned()).or_insert_with(|| {
engine().map_or(U256::new(0u64), |_a| loop {})
})
}
}
19 changes: 19 additions & 0 deletions src/test/run-pass/issue-31702.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// aux-build:issue-31702-1.rs
// aux-build:issue-31702-2.rs

// this test is actually entirely in the linked library crates

extern crate issue_31702_1;
extern crate issue_31702_2;

fn main() {}

0 comments on commit 97f7898

Please sign in to comment.