-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Labels
Description
🚀 Feature Request
The decompiler decompiles the code below (ref: decompiler test case noexit_loop.move
)
fun baz(_: &u64) {}
fun f13(cond: bool) {
1 + if (cond) 0 else { 1 } + 2;
1 + loop {} + 2;
1 + return + 0;
baz(&if (cond) 0 else 1);
baz(&loop {});
baz(&return);
baz(&abort 0);
}
===>
fun f13(cond: bool) {
let _t2;
loop {
if (cond) {
_t2 = 0;
break
};
_t2 = 1;
break
};
loop continue
}
The first loop is introduced by control flow structuring. It should be optimized.