search for: always_false_at_runtime

Displaying 2 results from an estimated 2 matches for "always_false_at_runtime".

2016 Oct 18
2
Killing undef and spreading poison
...;> >> Right. >> I think there were other examples, but I don't have them here handy. But >> at least this one is very problematic for GVN. > > Another example is this: > > void f(int k) { > if (k != 0) { > for (< finite loop >) { > if (always_false_at_runtime) { > print(1 / k); > } > } > } > } > > We'd like to hoist the `1 / k` computation to the preheader. However, we can't do that today if `k` is undef, and we've defined branching on undef to be a non-deterministic choice. This one isn’t clear to me:...
2016 Oct 18
2
Killing undef and spreading poison
>> >> Here we are evaluating C2 before C. If the original loop never >> >> executed then we had never evaluated C2, while now we do. So we >> >> need >> >> to make sure there's no UB for branching on C2. Freeze ensures >> >> that >> >> so we would actually have 'if (freeze(C2))' instead. >> >> Note