]> git.proxmox.com Git - rustc.git/blame - src/test/mir-opt/copy_propagation.rs
New upstream version 1.36.0+dfsg1
[rustc.git] / src / test / mir-opt / copy_propagation.rs
CommitLineData
476ff2be
SL
1fn test(x: u32) -> u32 {
2 let y = x;
3 y
a7813a04
XL
4}
5
abe05a73
XL
6fn main() {
7 // Make sure the function actually gets instantiated.
8 test(0);
9}
476ff2be
SL
10
11// END RUST SOURCE
abe05a73 12// START rustc.test.CopyPropagation.before.mir
476ff2be 13// bb0: {
abe05a73 14// ...
8faf50e0 15// _2 = _1;
abe05a73 16// ...
8faf50e0 17// _0 = _2;
abe05a73 18// ...
476ff2be
SL
19// return;
20// }
abe05a73
XL
21// END rustc.test.CopyPropagation.before.mir
22// START rustc.test.CopyPropagation.after.mir
476ff2be 23// bb0: {
abe05a73 24// ...
8faf50e0 25// _0 = _1;
abe05a73 26// ...
476ff2be
SL
27// return;
28// }
abe05a73 29// END rustc.test.CopyPropagation.after.mir