Re: [PATCH] analyzer: fix pattern-test-2.c (PR 93291)

2020-01-17 Thread Jakub Jelinek
On Fri, Jan 17, 2020 at 05:01:24PM -0500, David Malcolm wrote: > Is there a way to force the use of this optimization at -O2, or is it > always going to be target dependent? You could try --param logical-op-non-short-circuit=0 , --param logical-op-non-short-circuit=1 and/or -mbranch-cost= (the las

[PATCH] analyzer: fix pattern-test-2.c (PR 93291)

2020-01-17 Thread David Malcolm
Amongst the inputs to the analyzer state machines that can lead to state transitions are conditions on CFG edges, such as a test for a pointer being non-NULL. These conditionals can be non-trivial to determine in the face of optimization. For example, at -O2: if (p == NULL || q == NULL) is op