2011/5/10 Richard Guenther <richard.guent...@gmail.com>: > On Tue, May 10, 2011 at 5:30 PM, Paolo Bonzini <bonz...@gnu.org> wrote: >> On 05/10/2011 05:23 PM, Richard Guenther wrote: >>> >>> I suppose you have testcases for all the cases you looked at, please >>> add some that cover these corner cases. >> >> Also, there is quite some tree-vrp.c dead code with these changes. Removing >> the TRUTH_*_CODE handling in VRP will help finding more places where the >> middle-end is building boolean operations. There should be testcases >> covering these parts of VRP. > > Btw, you can split the patch into two pieces - first, make TRUTH_* > expressions correctly typed (take boolean typed operands and procude > a boolean typed result) and verify that in verify_gimple_assign_binary. > A second patch than can do the s/TRUTH_/BIT_/ substitution during > gimplification. That way the first (and more difficult) part doesn't get > too big with unrelated changes. > > Richard. > >> Paolo >> >
Well, I think I found one big issue here about booified expression of condition. The gimple_boolify needs to handle COND_EXPR in more detail. As if a conditional expression has to be boolified, it means its condition and its other operands need to be boolified, too. And this is for sure one cause, why I see for ANDIF/ORIF and the truth AND|OR|XOR none boolean types. I will continue on that. To split this seems to make sense, as I have to touch much more areas for the TRUTH to BIT conversion. Regards, Kai