On 10/2/20 9:26 AM, Martin Liška wrote:
Yes, you simply get all sorts of conditions that hold when a
condition is
true, not just those based on the SSA name you put in. But it occured
to me that the use-case is somewhat different - for switch-conversion
you want to know whether the test _exactly_ matches a range test,
the VRP worker will not tell you that. For example if you had
if (x && a > 3 && a < 7) then it will give you 'a in [4, 6]' and it
might
not give you 'x in [1, 1]' (for example if x is float). But that's
required
for correctness.
Hello.
Adding Ranger guys. Is it something that can be handled by the
upcoming changes in VRP?
Presumably. It depends on exactly how the code lays out. We dont
process floats, so we wont know anything about the float (at least this
release :-). We will sort through complex logicals and tell you what we
do know, so if x is integral
if (x && a > 3 && a < 7)
will give you, on the final true edge:
x_5(D) int [-INF, -1][1, +INF]
a_6(D) int [4, 6]
IF x is a float, then we wont give you anything for x obviously, but on
the eventual true edge we'd still give you
a_6(D) int [4, 6]
Andrew