diff options
| author | bors <bors@rust-lang.org> | 2013-04-30 15:24:36 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-04-30 15:24:36 -0700 |
| commit | 9329bd669d704fffeed90c1f6703518345e6c2fd (patch) | |
| tree | b2b329c1271383020f962761713dd6a09e40fd5a | |
| parent | 9d966aef060030b1d13a55f6768a8e3afb9a842f (diff) | |
| parent | 4701716b56a22e209223110ce7d4aa9be45839da (diff) | |
| download | rust-9329bd669d704fffeed90c1f6703518345e6c2fd.tar.gz rust-9329bd669d704fffeed90c1f6703518345e6c2fd.zip | |
auto merge of #6136 : jld/rust/simplifycfg-unrevert, r=thestinger
Also add the clearly marked test case that should have been there all along, and un-xfail the not-so-obvious doc test that was affected.
| -rw-r--r-- | doc/rust.md | 2 | ||||
| m--------- | src/llvm | 0 | ||||
| -rw-r--r-- | src/test/run-pass/enum-nullable-simplifycfg-misopt.rs | 24 |
3 files changed, 25 insertions, 1 deletions
diff --git a/doc/rust.md b/doc/rust.md index 136c7ee9da3..9f81b38009f 100644 --- a/doc/rust.md +++ b/doc/rust.md @@ -2393,7 +2393,7 @@ variables in the arm's block, and control enters the block. An example of an `match` expression: -~~~~ {.xfail-test} +~~~~ # fn process_pair(a: int, b: int) { } # fn process_ten() { } diff --git a/src/llvm b/src/llvm -Subproject 56dd407f4f97a01b8df6554c569170d2fc276fc +Subproject 2e9f0d21fe321849a4759a01fc28eae82ef196d diff --git a/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs new file mode 100644 index 00000000000..b5cf15f3b38 --- /dev/null +++ b/src/test/run-pass/enum-nullable-simplifycfg-misopt.rs @@ -0,0 +1,24 @@ +// Copyright 2013 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. + +/*! + * This is a regression test for a bug in LLVM, fixed in upstream r179587, + * where the switch instructions generated for destructuring enums + * represented with nullable pointers could be misoptimized in some cases. + */ + +enum List<X> { Nil, Cons(X, @List<X>) } +pub fn main() { + match Cons(10, @Nil) { + Cons(10, _) => {} + Nil => {} + _ => fail!() + } +} |
