[Bug target/42542] Vectorizer produces incorrect results on max of signed intergers

2009-12-30 Thread hjl dot tools at gmail dot com
--- Comment #11 from hjl dot tools at gmail dot com 2009-12-30 15:50 --- A patch is posted at http://gcc.gnu.org/ml/gcc-patches/2009-12/msg01208.html -- hjl dot tools at gmail dot com changed: What|Removed |Added

[Bug target/42542] Vectorizer produces incorrect results on max of signed intergers

2009-12-29 Thread hjl dot tools at gmail dot com
--- Comment #7 from hjl dot tools at gmail dot com 2009-12-29 21:40 --- Here is a testcase in C: [...@gnu-6 tmp]$ cat y.c unsigned int foo[] __attribute__ ((aligned(16))) = { 0x8000, 1, 0xa000, 2, 3, 0xd000, 0xf000, 0xe000 }; unsigned int bar[] __attribute__

[Bug target/42542] Vectorizer produces incorrect results on max of signed intergers

2009-12-29 Thread hjl dot tools at gmail dot com
--- Comment #8 from hjl dot tools at gmail dot com 2009-12-29 23:50 --- Created an attachment (id=19420) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19420action=view) A patch I don't see how we can easily check unsigned underflow in vector integer subtraction. This patch simply

[Bug target/42542] Vectorizer produces incorrect results on max of signed intergers

2009-12-29 Thread hjl dot tools at gmail dot com
--- Comment #9 from hjl dot tools at gmail dot com 2009-12-30 04:47 --- Hi Richard, the code in question is added by http://gcc.gnu.org/ml/gcc-patches/2005-06/msg02185.html I don't quite understand how it can properly handle unsigned V4SI underflow in V4SI vector subtraction. --

[Bug target/42542] Vectorizer produces incorrect results on max of signed intergers

2009-12-29 Thread hjl dot tools at gmail dot com
--- Comment #10 from hjl dot tools at gmail dot com 2009-12-30 04:49 --- Created an attachment (id=19422) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19422action=view) An updated patch I am testing this patch now. -- hjl dot tools at gmail dot com changed: What