Case
When a side-effect free function is called multiple times, the call could be removed. Same applies to unused variables assigned to the result of the side-effect free function
Reproduction
Expected output
function foo() {
return !0
}
const a = foo();
console.log(a);
or a smaller version like - though above would suffice for now.
```ts
function foo() {
return !0
}
console.log(foo());
Actual output
function foo() {
return !0;
}
const a = foo();
foo(), foo(), console.log(a);
Info
Originally reported in rolldown/rolldown#5712