public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "kretz at kde dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/48616] -ftree-vectorize -mxop miscompiles right shift Date: Fri, 15 Apr 2011 12:11:00 -0000 [thread overview] Message-ID: <bug-48616-4-idiD0tZRBd@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-48616-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48616 Matthias Kretz <kretz at kde dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64 --- Comment #3 from Matthias Kretz <kretz at kde dot org> 2011-04-15 12:11:35 UTC --- (In reply to comment #1) > I see no vectorized loop which makes me suspect if-conversion. Can you > try if -ftree-loop-if-convert is enough to trigger the failure? % /opt/gcc-4.6.0/bin/g++ -mxop -O2 -ftree-vectorize xop_miscompile.cpp && ./a.out FAIL: ┍ at /home/mkretz/src/Vc/tests/arithmetics.cpp:259: FAIL: │ a[i] (16) == x (8) -> false FAIL: ┕ testShift<int_v> FAIL: ┍ at /home/mkretz/src/Vc/tests/arithmetics.cpp:259: FAIL: │ a[i] (16) == x (8) -> false FAIL: ┕ testShift<uint_v> Testing done. 0 tests passed. 2 tests failed. % /opt/gcc-4.6.0/bin/g++ -mxop -O2 -ftree-loop-if-convert xop_miscompile.cpp && ./a.out PASS: testShift<int_v> PASS: testShift<uint_v> Testing done. 2 tests passed. 0 tests failed. (In reply to comment #2) > You also haven't specified your target, whether you compile it as 32-bit or > 64-bit and where exactly it misbehaves. target is AMD64 (i.e. Bulldozer/Family 15h) The failure is in line 1724, or more specifically in lines 1288 and 1290. The operator>>= seems to get lost, so that the a[i] contain 16 instead of 16>>i. XOP has an instruction for this shift. For operator<<= (lines 1287 and 1289) GCC correctly translates the code to vpshad.
next prev parent reply other threads:[~2011-04-15 12:11 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-04-15 8:16 [Bug tree-optimization/48616] New: " kretz at kde dot org 2011-04-15 10:38 ` [Bug tree-optimization/48616] " rguenth at gcc dot gnu.org 2011-04-15 11:37 ` jakub at gcc dot gnu.org 2011-04-15 12:11 ` kretz at kde dot org [this message] 2011-04-15 12:32 ` jakub at gcc dot gnu.org 2011-04-15 13:08 ` jakub at gcc dot gnu.org 2011-04-15 13:39 ` jakub at gcc dot gnu.org 2011-04-15 16:03 ` jakub at gcc dot gnu.org 2011-04-15 16:56 ` jakub at gcc dot gnu.org 2011-04-15 19:09 ` jakub at gcc dot gnu.org 2011-04-15 20:10 ` rguenth at gcc dot gnu.org 2011-04-18 6:56 ` jakub at gcc dot gnu.org 2011-04-18 7:43 ` jakub at gcc dot gnu.org 2011-04-18 7:44 ` jakub at gcc dot gnu.org 2011-04-18 17:01 ` kretz at kde dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-48616-4-idiD0tZRBd@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).