[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-04-23 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 kelvin at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-04-22 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #19 from kelvin at gcc dot gnu.org --- Author: kelvin Date: Mon Apr 22 16:09:13 2019 New Revision: 270493 URL: https://gcc.gnu.org/viewcvs?rev=270493=gcc=rev Log: gcc/ChangeLog: 2019-04-22 Kelvin Nilsen Backport from

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-04-17 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #18 from kelvin at gcc dot gnu.org --- Author: kelvin Date: Wed Apr 17 15:40:12 2019 New Revision: 270413 URL: https://gcc.gnu.org/viewcvs?rev=270413=gcc=rev Log: gcc/ChangeLog: 2019-04-17 Kelvin Nilsen Backport from

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-04-12 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #17 from kelvin at gcc dot gnu.org --- Author: kelvin Date: Fri Apr 12 12:51:58 2019 New Revision: 270313 URL: https://gcc.gnu.org/viewcvs?rev=270313=gcc=rev Log: gcc/ChangeLog: 2019-04-12 Kelvin Nilsen PR target/87532

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-03-15 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #16 from kelvin at gcc dot gnu.org --- Author: kelvin Date: Fri Mar 15 19:52:43 2019 New Revision: 269715 URL: https://gcc.gnu.org/viewcvs?rev=269715=gcc=rev Log: gcc/ChangeLog: 2019-03-15 Kelvin Nilsen PR target/87532

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #15 from Bill Schmidt --- I kindasorta thought that's what I want. ;-) But now that I understand what you're saying, I believe I agree with you that this is probably a problem in our gimple folding. I am going to shut up now and

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-13 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #14 from kelvin at gcc dot gnu.org --- To reconcile comments 12 and 13, the subtle issue is that we don't even get into the altivec_resolve_overloaded_builtin function for the following code: vec_extract (vi, 10); The gimple

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #13 from Bill Schmidt --- Yes, please look at my previous comment. I believe the problem is in the VEC_EXTRACT processing in rs6000-c.c until proven otherwise... can you please try my debugging suggestion?

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-13 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #12 from kelvin at gcc dot gnu.org --- After further digging, I have uncovered some additional clues: after initial gimple expansion (i.e. the 005t.gimple trace file): vec_extract (vi, 3) is represented by __builtin_vec_ext_v4si

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-07 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #11 from Bill Schmidt --- Let me take back what I said earlier. We've had full support for vec_extract with a variable second argument for quite a long time. So let me try again responding to comment #4. We have special-case code

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-07 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #10 from Bill Schmidt --- Hm. Hang on while I look at some history.

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-07 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #9 from kelvin at gcc dot gnu.org --- The new tests proposed by as part of this PR represent illegal code and are properly rejected by the compiler. However, the compiler is not currently rejecting the following test program even

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-05 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #8 from Segher Boessenkool --- (In reply to Andrew Pinski from comment #6) > Note IIRC vec_extract came from the Cell BE C/C++ extension guide. I can't > seem to find that guide any more either :(. Try googling for

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-05 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #7 from Bill Schmidt --- To be absolutely clear, code like unsigned int get_auto_n_int ( vector unsigned int a, int n) { return __builtin_vec_extract (a, n); } is invalid. The second argument must be constant. This was

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-05 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #6 from Andrew Pinski --- Note IIRC vec_extract came from the Cell BE C/C++ extension guide. I can't seem to find that guide any more either :(. It does matter less these days as the ABI documents this intrinsics now too.

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-05 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #5 from Bill Schmidt --- To your second point, the new intrinsic programming reference under development already abandons the language about v[i], so that's covered. The next version of the ABI will drop vector API stuff (chapter 6

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-02-05 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #4 from kelvin at gcc dot gnu.org --- Is this a bug or just "bad documentation"? 64-Bit ELF V2 ABI Specification says vec_extract (v, 3) is equivalent to v[3]. Then it clarifies that vec_extract (arg1, arg2) uses modular arithmetic

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-01-30 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 Bill Schmidt changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2019-01-16 Thread will_schmidt at vnet dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 Will Schmidt changed: What|Removed |Added CC||will_schmidt at vnet dot ibm.com ---

[Bug target/87532] bad results from vec_extract(unsigned char, foo) dependent upon function inline

2018-10-05 Thread willschm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87532 --- Comment #1 from Will Schmidt --- Created attachment 44797 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44797=edit simpler testcase variation Simplified the testcase a bit. comment/uncomment the noinline attribute on the get_auto_n()