]> The Tcpdump Group git mirrors - libpcap/commit
optimizer: replacing unknown value with unknown value is not a no-op 613/head
authorMichal Kubecek <[email protected]>
Sun, 17 Sep 2017 17:17:09 +0000 (19:17 +0200)
committerMichal Kubecek <[email protected]>
Sun, 17 Sep 2017 17:17:09 +0000 (19:17 +0200)
commitb056d381ff63ae3421800a07dd263ce32806d15f
tree581d27244593f065883d5660310e0824c174ae58
parent181a8055463ca3c7864f0347d809d8125e76d9cd
optimizer: replacing unknown value with unknown value is not a no-op

Function vstore() checks if new and old value are the same and if they are,
it replaces the instruction with NOP. We must not do this if both old and
new value are 0 which means "unknown" as in this case, the actual values
(at runtime) can differ so that the instruction cannot be omitted.

An example of a program where this leads to incorrect optimization is shown
in issue #581.
optimize.c