This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2] Add uaddv_optab, usubv4_optab


On 11/22/2015 05:57 PM, Segher Boessenkool wrote:
Hi Richard,

On Sun, Nov 22, 2015 at 11:38:31AM +0100, Richard Henderson wrote:
One of which I believe I've worked around in the i386 backend, but I
believe to be a latent problem within combine.

With the following patch, disable the add<mode>3_*_overflow_2 patterns.
Then compile c-c++-common/torture/builtin-arith-overflow-4.c with -O2 and
you'll see

  t151_2add:
        testb   %dil, %dil
        leal    -1(%rdi), %eax
        jne     .L644


0xff + x < 0xff  (everything as unsigned char) is the same as  x != 0 .

You'd think yes. But certainly something right there triggered the abort that fails the test case. Perhaps I simply mis-identified the error, but the "fix" for this fixed the other as well.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]