public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array @ 2013-11-30 14:25 jori.liesenborgs at gmail dot com 2015-01-01 13:54 ` [Bug c++/59354] " gcc-bugzilla at contacts dot eelis.net ` (14 more replies) 0 siblings, 15 replies; 16+ messages in thread From: jori.liesenborgs at gmail dot com @ 2013-11-30 14:25 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 Bug ID: 59354 Summary: Unexpected result in g++ when casting int to char from an stl vector to an array Product: gcc Version: 4.8.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: jori.liesenborgs at gmail dot com Created attachment 31339 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31339&action=edit test code In the test code, the integer values from sixteen 4x4 blocks (in an stl vector) are copied into an unsigned char array for 64x4 values. Using just -O3 this appears to produce an incorrect result. Some remarks: - Adding -mno-sse again yields the right output. - If the vector is replaced by a simple array, the correct result is generated. - For 'xBlocks' less than 16, the correct result is also generated To generate and run the executable: g++ -O3 -o test test.ii ./test Generated output (all four lines should actually be the same): aaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbccccccccccccccccdddddddddddddddd aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnoooopppp aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnoooopppp aaaabbbbccccddddeeeeffffgggghhhhiiiijjjjkkkkllllmmmmnnnnoooopppp GCC version info: COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/4.8.2/lto-wrapper Target: x86_64-slackware-linux Configured with: ../gcc-4.8.2/configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,go,java,lto,objc --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --with-python-dir=/lib64/python2.7/site-packages --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --enable-lto --with-gnu-ld --verbose --enable-java-home --with-java-home=/usr/lib64/jvm/jre --with-jvm-root-dir=/usr/lib64/jvm --with-jvm-jar-dir=/usr/lib64/jvm/jvm-exports --with-arch-directory=amd64 --with-antlr-jar=/tmp/gcc/antlr-runtime-3.4.jar --enable-java-awt=gtk --disable-gtktest --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux Thread model: posix gcc version 4.8.2 (GCC) Test system was an 8 core slackware 14.0 system, with a /proc/cpuinfo content like this: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 58 model name : Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz stepping : 9 microcode : 0x17 cpu MHz : 2550.000 cache size : 8192 KB physical id : 0 siblings : 8 core id : 0 cpu cores : 4 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms bogomips : 6784.34 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/59354] Unexpected result in g++ when casting int to char from an stl vector to an array 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com @ 2015-01-01 13:54 ` gcc-bugzilla at contacts dot eelis.net 2015-01-07 20:30 ` [Bug middle-end/59354] " ville.voutilainen at gmail dot com ` (13 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: gcc-bugzilla at contacts dot eelis.net @ 2015-01-01 13:54 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 Eelis <gcc-bugzilla at contacts dot eelis.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gcc-bugzilla at contacts dot eelis | |.net --- Comment #1 from Eelis <gcc-bugzilla at contacts dot eelis.net> --- This is not specific to std::vector and not specific to C++. C testcase: #include <stdio.h> #include <stdint.h> int main() { uint32_t a[256] = {}; uint8_t b[1000] = {}; for(int i = 0; i != 256; ++i) a[i] = i % 5; for (int z = 0 ; z < 16; z++) for (int y = 0 ; y < 4; y++) for (int x = 0 ; x < 4; x++) b[y * 64 + z*4 + x] = a[z * 16 + y * 4 + x]; printf("%d\n", b[4]); return 0; } Prints '4' without -mno-sse, prints '1' with -mno-sse. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/59354] Unexpected result in g++ when casting int to char from an stl vector to an array 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com 2015-01-01 13:54 ` [Bug c++/59354] " gcc-bugzilla at contacts dot eelis.net @ 2015-01-07 20:30 ` ville.voutilainen at gmail dot com 2015-01-08 11:04 ` [Bug tree-optimization/59354] Element swizzling produces invalid result with -O3 (tree-cunrolli pass problem?) ubizjak at gmail dot com ` (12 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: ville.voutilainen at gmail dot com @ 2015-01-07 20:30 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 Ville Voutilainen <ville.voutilainen at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Status|UNCONFIRMED |NEW Last reconfirmed| |2015-01-07 CC| |ville.voutilainen at gmail dot com Component|c++ |middle-end Ever confirmed|0 |1 --- Comment #2 from Ville Voutilainen <ville.voutilainen at gmail dot com> --- Moving to middle-end. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] Element swizzling produces invalid result with -O3 (tree-cunrolli pass problem?) 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com 2015-01-01 13:54 ` [Bug c++/59354] " gcc-bugzilla at contacts dot eelis.net 2015-01-07 20:30 ` [Bug middle-end/59354] " ville.voutilainen at gmail dot com @ 2015-01-08 11:04 ` ubizjak at gmail dot com 2015-01-08 14:52 ` [Bug tree-optimization/59354] [4.8/4.9/5/Regression] " hjl.tools at gmail dot com ` (11 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: ubizjak at gmail dot com @ 2015-01-08 11:04 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 Uroš Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |tree-optimization Summary|Unexpected result in g++ |Element swizzling produces |when casting int to char |invalid result with -O3 |from an stl vector to an |(tree-cunrolli pass |array |problem?) --- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> --- It looks to me that cunrolli pass is messing up element swizzling code. bisection-friendly C testcase: --cut here-- void abort (void); unsigned int a[256]; unsigned char b[256]; int main() { int i, z, x, y; for(i = 0; i < 256; i++) a[i] = i % 5; for (z = 0; z < 16; z++) for (y = 0; y < 4; y++) for (x = 0; x < 4; x++) b[y*64 + z*4 + x] = a[z*16 + y*4 + x]; if (b[4] != 1) abort (); return 0; } --cut here-- gcc-5 on x86_64-linux-gnu with the above testcase: ~/gcc-build/gcc/cc1 -O3 pr59354.c Aborted ~/gcc-build/gcc/cc1 -O3 -fdisable-tree-cunrolli pr59354.c OK "Working" code produces following array: Breakpoint 1, main () at pr59354.c:18 18 if (b[4] != 1) (gdb) p b $1 = "\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\002\003\004\000\003\004\000\001"... (gdb) while "non-working" produces: (gdb) p b $1 = "\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\003\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001\004\000\001\002\000\001\002\003\001\002\003\004\002\003\004\000\003\004\000\001", '\000' <repeats 63 times> (gdb) >From gcc-bugs-return-472452-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 08 11:08:33 2015 Return-Path: <gcc-bugs-return-472452-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 21051 invoked by alias); 8 Jan 2015 11:08:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 20462 invoked by uid 55); 8 Jan 2015 11:08:27 -0000 From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/55212] [SH] Switch to LRA Date: Thu, 08 Jan 2015 11:08:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: olegendo at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-55212-4-W9YNHpB0aZ@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-55212-4@http.gcc.gnu.org/bugzilla/> References: <bug-55212-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00446.txt.bz2 Content-length: 468 https://gcc.gnu.org/bugzilla/show_bug.cgi?idU212 --- Comment #93 from Oleg Endo <olegendo at gcc dot gnu.org> --- Author: olegendo Date: Thu Jan 8 11:07:45 2015 New Revision: 219341 URL: https://gcc.gnu.org/viewcvs?rev!9341&root=gcc&view=rev Log: gcc/ PR target/55212 * config/sh/sh.md (*addsi3_compact): Emit reg-reg copy instead of constant load if constant operand fits into I08. Modified: trunk/gcc/ChangeLog trunk/gcc/config/sh/sh.md ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9/5/Regression] Element swizzling produces invalid result with -O3 (tree-cunrolli pass problem?) 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (2 preceding siblings ...) 2015-01-08 11:04 ` [Bug tree-optimization/59354] Element swizzling produces invalid result with -O3 (tree-cunrolli pass problem?) ubizjak at gmail dot com @ 2015-01-08 14:52 ` hjl.tools at gmail dot com 2015-01-08 14:54 ` jakub at gcc dot gnu.org ` (10 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: hjl.tools at gmail dot com @ 2015-01-08 14:52 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Element swizzling produces |[4.8/4.9/5/Regression] |invalid result with -O3 |Element swizzling produces |(tree-cunrolli pass |invalid result with -O3 |problem?) |(tree-cunrolli pass | |problem?) --- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> --- It is caused by r147829 (the new SLP pass). ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9/5/Regression] Element swizzling produces invalid result with -O3 (tree-cunrolli pass problem?) 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (3 preceding siblings ...) 2015-01-08 14:52 ` [Bug tree-optimization/59354] [4.8/4.9/5/Regression] " hjl.tools at gmail dot com @ 2015-01-08 14:54 ` jakub at gcc dot gnu.org 2015-01-08 14:59 ` hjl.tools at gmail dot com ` (9 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: jakub at gcc dot gnu.org @ 2015-01-08 14:54 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org Target Milestone|--- |4.8.5 ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9/5/Regression] Element swizzling produces invalid result with -O3 (tree-cunrolli pass problem?) 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (4 preceding siblings ...) 2015-01-08 14:54 ` jakub at gcc dot gnu.org @ 2015-01-08 14:59 ` hjl.tools at gmail dot com 2015-01-14 7:02 ` [Bug tree-optimization/59354] [4.8/4.9/5/Regression] Element swizzling produces invalid result with -O3 ubizjak at gmail dot com ` (8 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: hjl.tools at gmail dot com @ 2015-01-08 14:59 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 --- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to H.J. Lu from comment #4) > It is caused by r147829 (the new SLP pass). It may just expose the latent bug. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9/5/Regression] Element swizzling produces invalid result with -O3 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (5 preceding siblings ...) 2015-01-08 14:59 ` hjl.tools at gmail dot com @ 2015-01-14 7:02 ` ubizjak at gmail dot com 2015-01-14 8:52 ` [Bug tree-optimization/59354] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org ` (7 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: ubizjak at gmail dot com @ 2015-01-14 7:02 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 Uroš Bizjak <ubizjak at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|[4.8/4.9/5/Regression] |[4.8/4.9/5/Regression] |Element swizzling produces |Element swizzling produces |invalid result with -O3 |invalid result with -O3 |(tree-cunrolli pass | |problem?) | --- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> --- This is tree vectorizer problem, involving VECT_PACK_TRUNC expressions. Initializing the source array with: for (i = 0; i < 256; i++) a[i] = i; we can see the difference in the destination array: -O2 (correct): 0, 1, 2, 3, 16, 17, 18, 19, 32, 33, 34, 35, 48, 49, 50, 51, 64, 65, 66, 67, 80, 81, 82, 83, 96, 97, 98, 99, 112, 113, 114, 115, 128, 129, 130, 131, 144, 145, 146, 147, 160, 161, 162, 163, 176, 177, 178, 179, 192, 193, 194, 195, 208, 209, 210, 211, 224, 225, 226, 227, 240, 241, 242, 243, 4, 5, 6, 7, 20, 21, 22, 23, 36, 37, 38, 39, 52, 53, 54, 55, 68, 69, 70, 71, 84, 85, 86, 87, 100, 101, 102, 103, 116, 117, 118, 119, 132, 133, 134, 135, 148, 149, 150, 151, 164, 165, 166, 167, 180, 181, 182, 183, 196, 197, 198, 199, 212, 213, 214, 215, 228, 229, 230, 231, 244, 245, 246, 247, 8, 9, 10, 11, 24, 25, 26, 27, 40, 41, 42, 43, 56, 57, 58, 59, 72, 73, 74, 75, 88, 89, 90, 91, 104, 105, 106, 107, 120, 121, 122, 123, 136, 137, 138, 139, 152, 153, 154, 155, 168, 169, 170, 171, 184, 185, 186, 187, 200, 201, 202, 203, 216, 217, 218, 219, 232, 233, 234, 235, 248, 249, 250, 251, 12, 13, 14, 15, 28, 29, 30, 31, 44, 45, 46, 47, 60, 61, 62, 63, 76, 77, 78, 79, 92, 93, 94, 95, 108, 109, 110, 111, 124, 125, 126, 127, 140, 141, 142, 143, 156, 157, 158, 159, 172, 173, 174, 175, 188, 189, 190, 191, 204, 205, 206, 207, 220, 221, 222, 223, 236, 237, 238, 239, 252, 253, 254, 255 -O3 (incorrect): 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 4, 5, 6, 7, 20, 21, 22, 23, 36, 37, 38, 39, 52, 53, 54, 55, 68, 69, 70, 71, 84, 85, 86, 87, 100, 101, 102, 103, 116, 117, 118, 119, 132, 133, 134, 135, 148, 149, 150, 151, 164, 165, 166, 167, 180, 181, 182, 183, 196, 197, 198, 199, 212, 213, 214, 215, 228, 229, 230, 231, 244, 245, 246, 247, 8, 9, 10, 11, 24, 25, 26, 27, 40, 41, 42, 43, 56, 57, 58, 59, 72, 73, 74, 75, 88, 89, 90, 91, 104, 105, 106, 107, 120, 121, 122, 123, 136, 137, 138, 139, 152, 153, 154, 155, 168, 169, 170, 171, 184, 185, 186, 187, 200, 201, 202, 203, 216, 217, 218, 219, 232, 233, 234, 235, 248, 249, 250, 251, 12, 13, 14, 15, 28, 29, 30, 31, 44, 45, 46, 47, 60, 61, 62, 63, 76, 77, 78, 79, 92, 93, 94, 95, 108, 109, 110, 111, 124, 125, 126, 127, 140, 141, 142, 143, 156, 157, 158, 159, 172, 173, 174, 175, 188, 189, 190, 191, 204, 205, 206, 207, 220, 221, 222, 223, 236, 237, 238, 239, 252, 253, 254, 255 b[4] is already wrong. This is the beginning of the optimized dump: vect__24.6_185 = MEM[(unsigned int *)&a]; vect__24.7_182 = MEM[(unsigned int *)&a + 16B]; vect__24.8_176 = MEM[(unsigned int *)&a + 32B]; vect__24.9_173 = MEM[(unsigned int *)&a + 48B]; vect__24.10_160 = MEM[(unsigned int *)&a + 64B]; vect__24.11_158 = MEM[(unsigned int *)&a + 80B]; vect__24.12_155 = MEM[(unsigned int *)&a + 96B]; vect__24.13_148 = MEM[(unsigned int *)&a + 112B]; vect__24.14_145 = MEM[(unsigned int *)&a + 128B]; vect__24.15_138 = MEM[(unsigned int *)&a + 144B]; vect__24.16_136 = MEM[(unsigned int *)&a + 160B]; vect__24.17_133 = MEM[(unsigned int *)&a + 176B]; vect__24.18_126 = MEM[(unsigned int *)&a + 192B]; vect__24.19_124 = MEM[(unsigned int *)&a + 208B]; vect__24.20_111 = MEM[(unsigned int *)&a + 224B]; vect__24.21_108 = MEM[(unsigned int *)&a + 240B]; vect__25.23_107 = VEC_PACK_TRUNC_EXPR <vect__24.6_185, vect__24.7_182>; vect__25.23_101 = VEC_PACK_TRUNC_EXPR <vect__24.8_176, vect__24.9_173>; vect__25.23_100 = VEC_PACK_TRUNC_EXPR <vect__24.10_160, vect__24.11_158>; vect__25.23_99 = VEC_PACK_TRUNC_EXPR <vect__24.12_155, vect__24.13_148>; vect__25.23_87 = VEC_PACK_TRUNC_EXPR <vect__24.14_145, vect__24.15_138>; vect__25.23_86 = VEC_PACK_TRUNC_EXPR <vect__24.16_136, vect__24.17_133>; vect__25.23_85 = VEC_PACK_TRUNC_EXPR <vect__24.18_126, vect__24.19_124>; vect__25.23_81 = VEC_PACK_TRUNC_EXPR <vect__24.20_111, vect__24.21_108>; vect__25.22_80 = VEC_PACK_TRUNC_EXPR <vect__25.23_107, vect__25.23_101>; vect__25.22_79 = VEC_PACK_TRUNC_EXPR <vect__25.23_100, vect__25.23_99>; vect__25.22_78 = VEC_PACK_TRUNC_EXPR <vect__25.23_87, vect__25.23_86>; vect__25.22_77 = VEC_PACK_TRUNC_EXPR <vect__25.23_85, vect__25.23_81>; MEM[(unsigned char[256] *)&b] = vect__25.22_80; MEM[(unsigned char[256] *)&b + 16B] = vect__25.22_79; MEM[(unsigned char[256] *)&b + 32B] = vect__25.22_78; MEM[(unsigned char[256] *)&b + 48B] = vect__25.22_77; As can be seen, the first 64 elements of the destination array are simply truncated first 64 elements of source array. >From gcc-bugs-return-473126-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 07:13:09 2015 Return-Path: <gcc-bugs-return-473126-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 6359 invoked by alias); 14 Jan 2015 07:13:08 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 6295 invoked by uid 48); 14 Jan 2015 07:13:01 -0000 From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/59371] [4.8/4.9/5 Regression] Performance regression in GCC 4.8 and later versions. Date: Wed, 14 Jan 2015 07:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-59371-4-G6fpuQuwwx@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-59371-4@http.gcc.gnu.org/bugzilla/> References: <bug-59371-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01120.txt.bz2 Content-length: 1254 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59371 --- Comment #13 from Uroš Bizjak <ubizjak at gmail dot com> --- Difference (-O2 vs -O3) of neatly formatted results in a 16x16 array: --- res-O2.txt 2015-01-14 08:08:39.000000000 +0100 +++ res-O3.txt 2015-01-14 08:09:57.000000000 +0100 @@ -1,7 +1,7 @@ -000, 001, 002, 003, 016, 017, 018, 019, 032, 033, 034, 035, 048, 049, 050, 051, -064, 065, 066, 067, 080, 081, 082, 083, 096, 097, 098, 099, 112, 113, 114, 115, -128, 129, 130, 131, 144, 145, 146, 147, 160, 161, 162, 163, 176, 177, 178, 179, -192, 193, 194, 195, 208, 209, 210, 211, 224, 225, 226, 227, 240, 241, 242, 243, +000, 001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011, 012, 013, 014, 015, +016, 017, 018, 019, 020, 021, 022, 023, 024, 025, 026, 027, 028, 029, 030, 031, +032, 033, 034, 035, 036, 037, 038, 039, 040, 041, 042, 043, 044, 045, 046, 047, +048, 049, 050, 051, 052, 053, 054, 055, 056, 057, 058, 059, 060, 061, 062, 063, 004, 005, 006, 007, 020, 021, 022, 023, 036, 037, 038, 039, 052, 053, 054, 055, 068, 069, 070, 071, 084, 085, 086, 087, 100, 101, 102, 103, 116, 117, 118, 119, 132, 133, 134, 135, 148, 149, 150, 151, 164, 165, 166, 167, 180, 181, 182, 183, The problem is only with the first 64 elements. >From gcc-bugs-return-473127-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 07:14:20 2015 Return-Path: <gcc-bugs-return-473127-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 7301 invoked by alias); 14 Jan 2015 07:14:19 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 7256 invoked by uid 48); 14 Jan 2015 07:14:14 -0000 From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/59354] [4.8/4.9/5/Regression] Element swizzling produces invalid result with -O3 Date: Wed, 14 Jan 2015 07:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-59354-4-eraPMlvjXL@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-59354-4@http.gcc.gnu.org/bugzilla/> References: <bug-59354-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01121.txt.bz2 Content-length: 1253 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 --- Comment #7 from Uroš Bizjak <ubizjak at gmail dot com> --- Difference (-O2 vs -O3) of neatly formatted results in a 16x16 array: --- res-O2.txt 2015-01-14 08:08:39.000000000 +0100 +++ res-O3.txt 2015-01-14 08:09:57.000000000 +0100 @@ -1,7 +1,7 @@ -000, 001, 002, 003, 016, 017, 018, 019, 032, 033, 034, 035, 048, 049, 050, 051, -064, 065, 066, 067, 080, 081, 082, 083, 096, 097, 098, 099, 112, 113, 114, 115, -128, 129, 130, 131, 144, 145, 146, 147, 160, 161, 162, 163, 176, 177, 178, 179, -192, 193, 194, 195, 208, 209, 210, 211, 224, 225, 226, 227, 240, 241, 242, 243, +000, 001, 002, 003, 004, 005, 006, 007, 008, 009, 010, 011, 012, 013, 014, 015, +016, 017, 018, 019, 020, 021, 022, 023, 024, 025, 026, 027, 028, 029, 030, 031, +032, 033, 034, 035, 036, 037, 038, 039, 040, 041, 042, 043, 044, 045, 046, 047, +048, 049, 050, 051, 052, 053, 054, 055, 056, 057, 058, 059, 060, 061, 062, 063, 004, 005, 006, 007, 020, 021, 022, 023, 036, 037, 038, 039, 052, 053, 054, 055, 068, 069, 070, 071, 084, 085, 086, 087, 100, 101, 102, 103, 116, 117, 118, 119, 132, 133, 134, 135, 148, 149, 150, 151, 164, 165, 166, 167, 180, 181, 182, 183, The problem is only with the first 64 elements. >From gcc-bugs-return-473128-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 07:14:50 2015 Return-Path: <gcc-bugs-return-473128-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 8027 invoked by alias); 14 Jan 2015 07:14:49 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 7972 invoked by uid 48); 14 Jan 2015 07:14:45 -0000 From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/59371] [4.8/4.9/5 Regression] Performance regression in GCC 4.8 and later versions. Date: Wed, 14 Jan 2015 07:14:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-59371-4-hTL2pudfsy@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-59371-4@http.gcc.gnu.org/bugzilla/> References: <bug-59371-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01122.txt.bz2 Content-length: 291 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59371 --- Comment #14 from Uroš Bizjak <ubizjak at gmail dot com> --- (In reply to Uroš Bizjak from comment #13) > Difference (-O2 vs -O3) of neatly formatted results in a 16x16 array: Sorry, this comment doesn't belong in this PR. >From gcc-bugs-return-473129-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 07:52:34 2015 Return-Path: <gcc-bugs-return-473129-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 31116 invoked by alias); 14 Jan 2015 07:52:33 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 31078 invoked by uid 48); 14 Jan 2015 07:52:28 -0000 From: "trippels at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/64545] failed gcc build: internal compiler error: in inline_small_functions, at ipa-inline.c:1693 Date: Wed, 14 Jan 2015 07:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: ipa X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_gcctarget bug_status cf_reconfirmed_on component cc cf_gcchost everconfirmed cf_gccbuild Message-ID: <bug-64545-4-mK3kbCyskw@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-64545-4@http.gcc.gnu.org/bugzilla/> References: <bug-64545-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01123.txt.bz2 Content-length: 1654 https://gcc.gnu.org/bugzilla/show_bug.cgi?idd545 Markus Trippelsdorf <trippels at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target|x86_64-unknown-linux-gnu | Status|UNCONFIRMED |NEW Last reconfirmed| |2015-01-14 Component|middle-end |ipa CC| |hubicka at gcc dot gnu.org, | |trippels at gcc dot gnu.org Host|x86_64-unknown-linux-gnu | Ever confirmed|0 |1 Build|x86_64-unknown-linux-gnu | --- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- Also happens with tramp3d on ppc64: trippels@gcc2-power8 ~ % ~/gcc_test/usr/local/bin/g++ -Ofast -fprofile-generate -mcpu=power8 -w tramp3d-v4.cpp trippels@gcc2-power8 ~ % ./a.out --cartvis 1.0 0.0 --rhomin 1e-8 -n 20 ... trippels@gcc2-power8 ~ % ~/gcc_test/usr/local/bin/g++ -Ofast -fprofile-use -mcpu=power8 -w tramp3d-v4.cpp tramp3d-v4.cpp:64206:1: internal compiler error: in inline_small_functions, at ipa-inline.c:1658 } ^ 0x11041b0b inline_small_functions ../../gcc/gcc/ipa-inline.c:1658 0x11041b0b ipa_inline ../../gcc/gcc/ipa-inline.c:2167 0x11041b0b execute ../../gcc/gcc/ipa-inline.c:2539 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9/5 Regression] Element swizzling produces invalid result with -O3 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (6 preceding siblings ...) 2015-01-14 7:02 ` [Bug tree-optimization/59354] [4.8/4.9/5/Regression] Element swizzling produces invalid result with -O3 ubizjak at gmail dot com @ 2015-01-14 8:52 ` rguenth at gcc dot gnu.org 2015-01-14 8:57 ` jakub at gcc dot gnu.org ` (6 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-01-14 8:52 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Summary|[4.8/4.9/5/Regression] |[4.8/4.9/5 Regression] |Element swizzling produces |Element swizzling produces |invalid result with -O3 |invalid result with -O3 --- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to Uroš Bizjak from comment #3) > It looks to me that cunrolli pass is messing up element swizzling code. > > bisection-friendly C testcase: > > --cut here-- > void abort (void); > > unsigned int a[256]; > unsigned char b[256]; > > int main() > { > int i, z, x, y; > > for(i = 0; i < 256; i++) > a[i] = i % 5; > > for (z = 0; z < 16; z++) > for (y = 0; y < 4; y++) > for (x = 0; x < 4; x++) > b[y*64 + z*4 + x] = a[z*16 + y*4 + x]; > > if (b[4] != 1) > abort (); > > return 0; > } > --cut here-- This testcase works for me on trunk now (maybe one of my recent vectorizer fixes) but it miscompiles on the 4.9 and 4.8 branches (4.7 seems to work). Maybe somebody can bisect what fixed it on trunk? (and confirm the bug is indeed gone on trunk) >From gcc-bugs-return-473149-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 14 08:54:56 2015 Return-Path: <gcc-bugs-return-473149-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 2951 invoked by alias); 14 Jan 2015 08:54:56 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 2928 invoked by uid 48); 14 Jan 2015 08:54:52 -0000 From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/64592] [5 regression] tramp3d EH unwind tables are 50% bigger with mainline compared to GCC 4.9 Date: Wed, 14 Jan 2015 08:54:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_gcctarget version target_milestone Message-ID: <bug-64592-4-dndT5kSN6w@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-64592-4@http.gcc.gnu.org/bugzilla/> References: <bug-64592-4@http.gcc.gnu.org/bugzilla/> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01143.txt.bz2 Content-length: 525 https://gcc.gnu.org/bugzilla/show_bug.cgi?idd592 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64-linux Version|unknown |5.0 Target Milestone|--- |5.0 --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- accumulate-outgoing-args default setting change? ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9/5 Regression] Element swizzling produces invalid result with -O3 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (7 preceding siblings ...) 2015-01-14 8:52 ` [Bug tree-optimization/59354] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org @ 2015-01-14 8:57 ` jakub at gcc dot gnu.org 2015-01-14 8:59 ` ville.voutilainen at gmail dot com ` (5 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: jakub at gcc dot gnu.org @ 2015-01-14 8:57 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I can reproduce it even with r219580. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9/5 Regression] Element swizzling produces invalid result with -O3 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (8 preceding siblings ...) 2015-01-14 8:57 ` jakub at gcc dot gnu.org @ 2015-01-14 8:59 ` ville.voutilainen at gmail dot com 2015-01-14 9:47 ` rguenther at suse dot de ` (4 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: ville.voutilainen at gmail dot com @ 2015-01-14 8:59 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 --- Comment #10 from Ville Voutilainen <ville.voutilainen at gmail dot com> --- (In reply to Jakub Jelinek from comment #9) > I can reproduce it even with r219580. Likewise. People, remember to use -O3 when reproducing. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9/5 Regression] Element swizzling produces invalid result with -O3 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (9 preceding siblings ...) 2015-01-14 8:59 ` ville.voutilainen at gmail dot com @ 2015-01-14 9:47 ` rguenther at suse dot de 2015-01-14 14:06 ` rguenth at gcc dot gnu.org ` (3 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: rguenther at suse dot de @ 2015-01-14 9:47 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 --- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 14 Jan 2015, ville.voutilainen at gmail dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 > > --- Comment #10 from Ville Voutilainen <ville.voutilainen at gmail dot com> --- > (In reply to Jakub Jelinek from comment #9) > > I can reproduce it even with r219580. > > Likewise. People, remember to use -O3 when reproducing. Will try in a non-dev tree then (and then identify which of the gazillion local changes I have "fixes" it...) ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9/5 Regression] Element swizzling produces invalid result with -O3 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (10 preceding siblings ...) 2015-01-14 9:47 ` rguenther at suse dot de @ 2015-01-14 14:06 ` rguenth at gcc dot gnu.org 2015-01-14 14:09 ` [Bug tree-optimization/59354] [4.8/4.9 " rguenth at gcc dot gnu.org ` (2 subsequent siblings) 14 siblings, 0 replies; 16+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-01-14 14:06 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 --- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Wed Jan 14 14:06:07 2015 New Revision: 219603 URL: https://gcc.gnu.org/viewcvs?rev=219603&root=gcc&view=rev Log: 2015-01-14 Richard Biener <rguenther@suse.de> PR tree-optimization/59354 * tree-vect-slp.c (vect_build_slp_tree_1): Treat loads from groups larger than the slp group size as having gaps. * gcc.dg/vect/pr59354.c: New testcase. Added: trunk/gcc/testsuite/gcc.dg/vect/pr59354.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-slp.c ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9 Regression] Element swizzling produces invalid result with -O3 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (11 preceding siblings ...) 2015-01-14 14:06 ` rguenth at gcc dot gnu.org @ 2015-01-14 14:09 ` rguenth at gcc dot gnu.org 2015-02-23 12:19 ` rguenth at gcc dot gnu.org 2015-06-23 8:46 ` [Bug tree-optimization/59354] [4.8 " rguenth at gcc dot gnu.org 14 siblings, 0 replies; 16+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-01-14 14:09 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |5.0 Summary|[4.8/4.9/5 Regression] |[4.8/4.9 Regression] |Element swizzling produces |Element swizzling produces |invalid result with -O3 |invalid result with -O3 --- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> --- Fixed on trunk sofar. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8/4.9 Regression] Element swizzling produces invalid result with -O3 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (12 preceding siblings ...) 2015-01-14 14:09 ` [Bug tree-optimization/59354] [4.8/4.9 " rguenth at gcc dot gnu.org @ 2015-02-23 12:19 ` rguenth at gcc dot gnu.org 2015-06-23 8:46 ` [Bug tree-optimization/59354] [4.8 " rguenth at gcc dot gnu.org 14 siblings, 0 replies; 16+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-02-23 12:19 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 --- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> --- Author: rguenth Date: Mon Feb 23 11:14:25 2015 New Revision: 220912 URL: https://gcc.gnu.org/viewcvs?rev=220912&root=gcc&view=rev Log: 2015-02-23 Richard Biener <rguenther@suse.de> Backport from mainline 2014-11-19 Richard Biener <rguenther@suse.de> PR tree-optimization/63844 * omp-low.c (fixup_child_record_type): Use a restrict qualified referece type for the receiver parameter. 2014-11-27 Richard Biener <rguenther@suse.de> PR tree-optimization/61634 * tree-vect-slp.c: Include gimple-walk.h. (vect_detect_hybrid_slp_stmts): Rewrite to propagate hybrid down the SLP tree for one scalar statement. (vect_detect_hybrid_slp_1): New walker function. (vect_detect_hybrid_slp_2): Likewise. (vect_detect_hybrid_slp): Properly handle pattern statements in a pre-scan over all loop stmts. * gcc.dg/vect/pr61634.c: New testcase. 2015-01-14 Richard Biener <rguenther@suse.de> PR tree-optimization/59354 * tree-vect-slp.c (vect_build_slp_tree_1): Treat loads from groups larger than the slp group size as having gaps. * gcc.dg/vect/pr59354.c: New testcase. 2015-02-10 Richard Biener <rguenther@suse.de> PR tree-optimization/64909 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Properly pass a scalar-stmt count estimate to the cost model. * tree-vect-data-refs.c (vect_peeling_hash_get_lowest_cost): Likewise. * gcc.dg/vect/costmodel/x86_64/costmodel-pr64909.c: New testcase. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-pr64909.c branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/vect/pr59354.c branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/vect/pr61634.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/omp-low.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog branches/gcc-4_9-branch/gcc/tree-vect-data-refs.c branches/gcc-4_9-branch/gcc/tree-vect-loop.c branches/gcc-4_9-branch/gcc/tree-vect-slp.c ^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/59354] [4.8 Regression] Element swizzling produces invalid result with -O3 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com ` (13 preceding siblings ...) 2015-02-23 12:19 ` rguenth at gcc dot gnu.org @ 2015-06-23 8:46 ` rguenth at gcc dot gnu.org 14 siblings, 0 replies; 16+ messages in thread From: rguenth at gcc dot gnu.org @ 2015-06-23 8:46 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59354 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Target Milestone|4.8.5 |4.9.3 Known to fail| |4.8.5 --- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> --- Fixed for 4.9.3. ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2015-06-23 8:46 UTC | newest] Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-11-30 14:25 [Bug c++/59354] New: Unexpected result in g++ when casting int to char from an stl vector to an array jori.liesenborgs at gmail dot com 2015-01-01 13:54 ` [Bug c++/59354] " gcc-bugzilla at contacts dot eelis.net 2015-01-07 20:30 ` [Bug middle-end/59354] " ville.voutilainen at gmail dot com 2015-01-08 11:04 ` [Bug tree-optimization/59354] Element swizzling produces invalid result with -O3 (tree-cunrolli pass problem?) ubizjak at gmail dot com 2015-01-08 14:52 ` [Bug tree-optimization/59354] [4.8/4.9/5/Regression] " hjl.tools at gmail dot com 2015-01-08 14:54 ` jakub at gcc dot gnu.org 2015-01-08 14:59 ` hjl.tools at gmail dot com 2015-01-14 7:02 ` [Bug tree-optimization/59354] [4.8/4.9/5/Regression] Element swizzling produces invalid result with -O3 ubizjak at gmail dot com 2015-01-14 8:52 ` [Bug tree-optimization/59354] [4.8/4.9/5 Regression] " rguenth at gcc dot gnu.org 2015-01-14 8:57 ` jakub at gcc dot gnu.org 2015-01-14 8:59 ` ville.voutilainen at gmail dot com 2015-01-14 9:47 ` rguenther at suse dot de 2015-01-14 14:06 ` rguenth at gcc dot gnu.org 2015-01-14 14:09 ` [Bug tree-optimization/59354] [4.8/4.9 " rguenth at gcc dot gnu.org 2015-02-23 12:19 ` rguenth at gcc dot gnu.org 2015-06-23 8:46 ` [Bug tree-optimization/59354] [4.8 " rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).