Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
9366dfdf
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9366dfdf
编写于
9月 02, 2021
作者:
M
Matthew Jasper
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Bless 32bit MIR opt tests
上级
fd5b40fd
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
72 addition
and
97 deletion
+72
-97
compiler/rustc_mir_build/src/build/expr/into.rs
compiler/rustc_mir_build/src/build/expr/into.rs
+1
-1
compiler/rustc_mir_build/src/build/matches/mod.rs
compiler/rustc_mir_build/src/build/matches/mod.rs
+3
-3
src/test/mir-opt/const_prop/discriminant.main.ConstProp.32bit.diff
...mir-opt/const_prop/discriminant.main.ConstProp.32bit.diff
+6
-6
src/test/mir-opt/matches_reduce_branches.match_nested_if.MatchBranchSimplification.32bit.diff
...ches.match_nested_if.MatchBranchSimplification.32bit.diff
+37
-62
src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
...t/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
+15
-15
src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.32bit.diff
...opt/while_let_loops.change_loop_body.ConstProp.32bit.diff
+10
-10
未找到文件。
compiler/rustc_mir_build/src/build/expr/into.rs
浏览文件 @
9366dfdf
...
...
@@ -106,7 +106,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
ExprKind
::
Let
{
expr
,
ref
pat
}
=>
{
let
scope
=
this
.local_scope
();
let
(
true_block
,
false_block
)
=
this
.in_if_then_scope
(
scope
,
|
this
|
{
this
.lower_let_e
lse
(
block
,
&
this
.thir
[
expr
],
pat
,
scope
,
expr_span
)
this
.lower_let_e
xpr
(
block
,
&
this
.thir
[
expr
],
pat
,
scope
,
expr_span
)
});
let
join_block
=
this
.cfg
.start_new_block
();
...
...
compiler/rustc_mir_build/src/build/matches/mod.rs
浏览文件 @
9366dfdf
...
...
@@ -60,7 +60,7 @@ pub(crate) fn then_else_break(
})
}
ExprKind
::
Let
{
expr
,
ref
pat
}
=>
{
this
.lower_let_e
lse
(
block
,
&
this
.thir
[
expr
],
pat
,
break_scope
,
variable_scope_span
)
this
.lower_let_e
xpr
(
block
,
&
this
.thir
[
expr
],
pat
,
break_scope
,
variable_scope_span
)
}
_
=>
{
let
mutability
=
Mutability
::
Mut
;
...
...
@@ -1754,7 +1754,7 @@ fn calculate_fake_borrows<'b>(
// Pat binding - used for `let` and function parameters as well.
impl
<
'a
,
'tcx
>
Builder
<
'a
,
'tcx
>
{
crate
fn
lower_let_e
lse
(
crate
fn
lower_let_e
xpr
(
&
mut
self
,
mut
block
:
BasicBlock
,
expr
:
&
Expr
<
'tcx
>
,
...
...
@@ -1962,7 +1962,7 @@ fn bind_and_guard_matched_candidate<'pat>(
Guard
::
IfLet
(
ref
pat
,
scrutinee
)
=>
{
let
s
=
&
this
.thir
[
scrutinee
];
guard_span
=
s
.span
;
this
.lower_let_e
lse
(
block
,
s
,
pat
,
match_scope
,
arm_span
)
this
.lower_let_e
xpr
(
block
,
s
,
pat
,
match_scope
,
arm_span
)
}
});
...
...
src/test/mir-opt/const_prop/discriminant.main.ConstProp.32bit.diff
浏览文件 @
9366dfdf
...
...
@@ -18,22 +18,22 @@
((_3 as Some).0: bool) = const true; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
discriminant(_3) = 1; // scope 0 at $DIR/discriminant.rs:11:34: 11:44
- _4 = discriminant(_3); // scope 0 at $DIR/discriminant.rs:11:21: 11:31
- switchInt(move _4) -> [1_isize: bb
2, otherwise: bb1
]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
- switchInt(move _4) -> [1_isize: bb
1, otherwise: bb3
]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ _4 = const 1_isize; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ switchInt(const 1_isize) -> [1_isize: bb
2, otherwise: bb1
]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
+ switchInt(const 1_isize) -> [1_isize: bb
1, otherwise: bb3
]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
}
bb1: {
_2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:11:59: 11:61
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
switchInt(((_3 as Some).0: bool)) -> [false: bb3, otherwise: bb2]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
}
bb2: {
switchInt(((_3 as Some).0: bool)) -> [false: bb1, otherwise: bb3]; // scope 0 at $DIR/discriminant.rs:11:21: 11:31
_2 = const 42_i32; // scope 0 at $DIR/discriminant.rs:11:47: 11:49
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
}
bb3: {
_2 = const
42_i32; // scope 0 at $DIR/discriminant.rs:11:47: 11:49
_2 = const
10_i32; // scope 0 at $DIR/discriminant.rs:11:59: 11:61
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
}
...
...
src/test/mir-opt/matches_reduce_branches.match_nested_if.MatchBranchSimplification.32bit.diff
浏览文件 @
9366dfdf
...
...
@@ -4,105 +4,80 @@
fn match_nested_if() -> bool {
let mut _0: bool; // return place in scope 0 at $DIR/matches_reduce_branches.rs:39:25: 39:29
let _1: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:40:9: 40:12
let mut _2: (); // in scope 0 at $DIR/matches_reduce_branches.rs:40:21: 40:23
let mut _3: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
let mut _4: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
let mut _5: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
let mut _6: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
+ let mut _7: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
+ let mut _8: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
+ let mut _9: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
+ let mut _10: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
let mut _2: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
let mut _3: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
let mut _4: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
+ let mut _5: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
+ let mut _6: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
+ let mut _7: bool; // in scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
scope 1 {
debug val => _1; // in scope 1 at $DIR/matches_reduce_branches.rs:40:9: 40:12
}
bb0: {
StorageLive(_1); // scope 0 at $DIR/matches_reduce_branches.rs:40:9: 40:12
StorageLive(_2); // scope 0 at $DIR/matches_reduce_branches.rs:40:21: 40:23
StorageLive(_3); // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
StorageLive(_4); // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
StorageLive(_5); // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
StorageLive(_6); // scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
_6 = const true; // scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
- switchInt(move _6) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
StorageLive(_2); // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
StorageLive(_3); // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
StorageLive(_4); // scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
_4 = const true; // scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
- switchInt(move _4) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
- }
-
- bb1: {
- _
5
= const true; // scope 0 at $DIR/matches_reduce_branches.rs:41:31: 41:35
- _
3
= const true; // scope 0 at $DIR/matches_reduce_branches.rs:41:31: 41:35
- goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
- }
-
- bb2: {
- _
5
= const false; // scope 0 at $DIR/matches_reduce_branches.rs:41:45: 41:50
- _
3
= const false; // scope 0 at $DIR/matches_reduce_branches.rs:41:45: 41:50
- goto -> bb3; // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
- }
-
- bb3: {
+ StorageLive(_
7); // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
+ _
7 = move _6; // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
+ _
5 = Ne(_7
, const false); // scope 0 at $DIR/matches_reduce_branches.rs:41:45: 41:50
+ StorageDead(_
7); // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
StorageDead(_
6
); // scope 0 at $DIR/matches_reduce_branches.rs:41:51: 41:52
- switchInt(move _
5) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
+ StorageLive(_
5); // scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
+ _
5 = move _4; // scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
+ _
3 = Ne(_5
, const false); // scope 0 at $DIR/matches_reduce_branches.rs:41:45: 41:50
+ StorageDead(_
5); // scope 0 at $DIR/matches_reduce_branches.rs:41:24: 41:28
StorageDead(_
4
); // scope 0 at $DIR/matches_reduce_branches.rs:41:51: 41:52
- switchInt(move _
3) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
- }
-
- bb4: {
- _
4
= const true; // scope 0 at $DIR/matches_reduce_branches.rs:41:55: 41:59
- _
2
= const true; // scope 0 at $DIR/matches_reduce_branches.rs:41:55: 41:59
- goto -> bb6; // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
- }
-
- bb5: {
- _
4
= const false; // scope 0 at $DIR/matches_reduce_branches.rs:41:69: 41:74
- _
2
= const false; // scope 0 at $DIR/matches_reduce_branches.rs:41:69: 41:74
- goto -> bb6; // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
- }
-
- bb6: {
+ StorageLive(_
8); // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
+ _
8 = move _5; // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
+ _
4 = Ne(_8
, const false); // scope 0 at $DIR/matches_reduce_branches.rs:41:69: 41:74
+ StorageDead(_
8); // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
StorageDead(_
5
); // scope 0 at $DIR/matches_reduce_branches.rs:41:75: 41:76
- switchInt(move _
4) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
+ StorageLive(_
6); // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
+ _
6 = move _3; // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
+ _
2 = Ne(_6
, const false); // scope 0 at $DIR/matches_reduce_branches.rs:41:69: 41:74
+ StorageDead(_
6); // scope 0 at $DIR/matches_reduce_branches.rs:41:21: 41:52
StorageDead(_
3
); // scope 0 at $DIR/matches_reduce_branches.rs:41:75: 41:76
- switchInt(move _
2) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
- }
-
- bb7: {
- _3 = const true; // scope 0 at $DIR/matches_reduce_branches.rs:42:13: 42:17
- goto -> bb9; // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
- }
-
- bb8: {
- _3 = const false; // scope 0 at $DIR/matches_reduce_branches.rs:44:13: 44:18
- goto -> bb9; // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
- }
-
- bb9: {
+ StorageLive(_9); // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
+ _9 = move _4; // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
+ _3 = Ne(_9, const false); // scope 0 at $DIR/matches_reduce_branches.rs:44:13: 44:18
+ StorageDead(_9); // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
StorageDead(_4); // scope 0 at $DIR/matches_reduce_branches.rs:45:9: 45:10
- switchInt(move _3) -> [false: bb11, otherwise: bb10]; // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
- }
-
- bb10: {
+ StorageLive(_10); // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
+ _10 = move _3; // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
StorageDead(_3); // scope 0 at $DIR/matches_reduce_branches.rs:48:9: 48:10
+ StorageLive(_7); // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
+ _7 = move _2; // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
StorageDead(_2); // scope 0 at $DIR/matches_reduce_branches.rs:45:9: 45:10
- _1 = const true; // scope 0 at $DIR/matches_reduce_branches.rs:47:13: 47:17
- goto -> bb
12; // scope 0 at $DIR/matches_reduce_branches.rs:47:13: 47:17
- goto -> bb
9; // scope 0 at $DIR/matches_reduce_branches.rs:48:9: 48:10
- }
-
- bb
11
: {
- StorageDead(_
3); // scope 0 at $DIR/matches_reduce_branches.rs:48:9: 48
:10
- bb
8
: {
- StorageDead(_
2); // scope 0 at $DIR/matches_reduce_branches.rs:45:9: 45
:10
- _1 = const false; // scope 0 at $DIR/matches_reduce_branches.rs:49:14: 49:19
- goto -> bb
12;
// scope 0 at $DIR/matches_reduce_branches.rs:49:14: 49:19
- goto -> bb
9;
// scope 0 at $DIR/matches_reduce_branches.rs:49:14: 49:19
- }
-
- bb12: {
+ _1 = Ne(_10, const false); // scope 0 at $DIR/matches_reduce_branches.rs:49:14: 49:19
+ StorageDead(_10); // scope 0 at $DIR/matches_reduce_branches.rs:41:15: 45:10
StorageDead(_2); // scope 0 at $DIR/matches_reduce_branches.rs:50:6: 50:7
- bb9: {
+ _1 = Ne(_7, const false); // scope 0 at $DIR/matches_reduce_branches.rs:49:14: 49:19
+ StorageDead(_7); // scope 0 at $DIR/matches_reduce_branches.rs:41:18: 41:76
_0 = _1; // scope 1 at $DIR/matches_reduce_branches.rs:51:5: 51:8
StorageDead(_1); // scope 0 at $DIR/matches_reduce_branches.rs:52:1: 52:2
return; // scope 0 at $DIR/matches_reduce_branches.rs:52:2: 52:2
...
...
src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
浏览文件 @
9366dfdf
...
...
@@ -5,16 +5,16 @@
| '_#1r | Local | ['_#1r]
|
| Inferred Region Values
| '_#0r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=
1], bb4[0..=3
], bb5[0..=2], bb6[0..=5], bb7[0], '_#0r, '_#1r}
| '_#1r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=
1], bb4[0..=3
], bb5[0..=2], bb6[0..=5], bb7[0], '_#1r}
| '_#0r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=
3], bb4[0..=1
], bb5[0..=2], bb6[0..=5], bb7[0], '_#0r, '_#1r}
| '_#1r | U0 | {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=
3], bb4[0..=1
], bb5[0..=2], bb6[0..=5], bb7[0], '_#1r}
| '_#2r | U0 | {}
| '_#3r | U0 | {bb1[0..=7], bb2[0..=2]}
| '_#4r | U0 | {bb1[1..=7], bb2[0..=2]}
| '_#5r | U0 | {bb1[4..=7], bb2[0..=2]}
|
| Inference Constraints
| '_#0r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=
1], bb4[0..=3
], bb5[0..=2], bb6[0..=5], bb7[0]}
| '_#1r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=
1], bb4[0..=3
], bb5[0..=2], bb6[0..=5], bb7[0]}
| '_#0r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=
3], bb4[0..=1
], bb5[0..=2], bb6[0..=5], bb7[0]}
| '_#1r live at {bb0[0..=8], bb1[0..=7], bb2[0..=3], bb3[0..=
3], bb4[0..=1
], bb5[0..=2], bb6[0..=5], bb7[0]}
| '_#3r live at {bb1[0]}
| '_#4r live at {bb1[1..=3]}
| '_#5r live at {bb1[4..=7], bb2[0..=2]}
...
...
@@ -63,32 +63,32 @@ fn main() -> () {
FakeRead(ForLet(None), _6); // bb1[4]: scope 2 at $DIR/region-subtyping-basic.rs:19:9: 19:10
StorageLive(_7); // bb1[5]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
_7 = const Const(Value(Scalar(0x01)): bool); // bb1[6]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
switchInt(move _7) -> [Const(Value(Scalar(0x00)): bool): bb
3, otherwise: bb2]; // bb1[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
switchInt(move _7) -> [Const(Value(Scalar(0x00)): bool): bb
4, otherwise: bb2]; // bb1[7]: scope 3 at $DIR/region-subtyping-basic.rs:20:8: 20:12
}
bb2: {
StorageLive(_8); // bb2[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
StorageLive(_9); // bb2[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17
_9 = (*_6); // bb2[2]: scope 3 at $DIR/region-subtyping-basic.rs:21:15: 21:17
_8 = Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(move _9) -> [return: bb
4
, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
_8 = Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(move _9) -> [return: bb
3
, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region-subtyping-basic.rs:21:9: 21:18
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:21:9: 21:14
// + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
}
bb3: {
StorageLive(_10); // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
_10 = Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(const Const(Value(Scalar(0x00000016)): usize)) -> [return: bb5, unwind: bb7]; // bb3[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:23:9: 23:14
// + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
StorageDead(_9); // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:17: 21:18
StorageDead(_8); // bb3[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19
_0 = const Const(Value(Scalar(<ZST>)): ()); // bb3[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6
goto -> bb6; // bb3[3]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
}
bb4: {
StorageDead(_9); // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:21:17: 21:18
StorageDead(_8); // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:21:18: 21:19
_0 = const Const(Value(Scalar(<ZST>)): ()); // bb4[2]: scope 3 at $DIR/region-subtyping-basic.rs:20:13: 22:6
goto -> bb6; // bb4[3]: scope 3 at $DIR/region-subtyping-basic.rs:20:5: 24:6
StorageLive(_10); // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
_10 = Const(Value(Scalar(<ZST>)): fn(usize) -> bool {use_x})(const Const(Value(Scalar(0x00000016)): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:23:9: 23:18
// mir::Constant
// + span: $DIR/region-subtyping-basic.rs:23:9: 23:14
// + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(Scalar(<ZST>)) }
}
bb5: {
...
...
src/test/mir-opt/while_let_loops.change_loop_body.ConstProp.32bit.diff
浏览文件 @
9366dfdf
...
...
@@ -21,28 +21,28 @@
StorageLive(_3); // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
discriminant(_3) = 0; // scope 1 at $DIR/while_let_loops.rs:7:28: 7:32
- _4 = discriminant(_3); // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
- switchInt(move _4) -> [1_isize: bb
2, otherwise: bb1
]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
- switchInt(move _4) -> [1_isize: bb
1, otherwise: bb3
]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
+ _4 = const 0_isize; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
+ switchInt(const 0_isize) -> [1_isize: bb
2, otherwise: bb1
]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
+ switchInt(const 0_isize) -> [1_isize: bb
1, otherwise: bb3
]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
}
bb1: {
StorageLive(_7); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
nop; // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
StorageDead(_7); // scope 1 at $DIR/while_let_loops.rs:10:5: 10:6
goto -> bb4; // scope 1 at no-location
switchInt(((_3 as Some).0: u32)) -> [0_u32: bb2, otherwise: bb3]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
}
bb2: {
switchInt(((_3 as Some).0: u32)) -> [0_u32: bb3, otherwise: bb1]; // scope 1 at $DIR/while_let_loops.rs:7:15: 7:25
}
bb3: {
_1 = const 1_i32; // scope 1 at $DIR/while_let_loops.rs:8:9: 8:15
nop; // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
goto -> bb4; // scope 1 at $DIR/while_let_loops.rs:9:9: 9:14
}
bb3: {
StorageLive(_7); // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
nop; // scope 1 at $DIR/while_let_loops.rs:7:5: 10:6
StorageDead(_7); // scope 1 at $DIR/while_let_loops.rs:10:5: 10:6
goto -> bb4; // scope 1 at no-location
}
bb4: {
StorageDead(_3); // scope 1 at $DIR/while_let_loops.rs:10:5: 10:6
StorageDead(_1); // scope 0 at $DIR/while_let_loops.rs:11:1: 11:2
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录