On Tue, 7 May 2013, Richard Biener wrote:
On Tue, 7 May 2013, Marc Glisse wrote:
On Thu, 2 May 2013, Richard Biener wrote:
Can you followup with a patch to do
s/integer_all_onesp/integer_minus_onep/ where it makes sense?
This passes bootstrap+testsuite on x86_64-linux-gnu. I kept all_ones for
bitmask type of operations (BIT_*_EXPR, VEC_COND_EXPR) and used minus_one for
the maximal unsigned value. A few cases were not very clear and chosen rather
randomly. There is one place in fold-const where we would actually want
instead an integer_zero_or_all_onesp which checks whether each element of a
vector (or complex) is 0 or -1, which would accept {-1,0,0,-1} for instance,
but I didn't add that.
Hmm, just that I notice now - will integer_minus_onep () return true
for -1U? Maybe that's confusing?
Yes, integer_minus_onep returns true for -1U. It is equivalent to
integer_all_onesp except for complex numbers, where it checks for (-1,0)
instead of (-1,-1). We could keep using integer_all_onesp for cases that
cannot be complex (the current situation). Or would you prefer a renaming
of some functions?
--
Marc Glisse