[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-12 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 --- Comment #9 from Jakub Jelinek jakub at gcc dot gnu.org --- Author: jakub Date: Tue Mar 10 21:03:21 2015 New Revision: 221335 URL: https://gcc.gnu.org/viewcvs?rev=221335root=gccview=rev Log: PR target/65368 * config/i386/i386.md

[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 --- Comment #7 from Uroš Bizjak ubizjak at gmail dot com --- (In reply to Jakub Jelinek from comment #6) To some extent BZHI is a special case of BEXTR, but I'm afraid any generalization is much harder due to the weirdo encoding of the

[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 --- Comment #5 from Uroš Bizjak ubizjak at gmail dot com --- (In reply to Jakub Jelinek from comment #3) For zero_extract RTL we require that the POS and LEN arguments are in the right ranges, while bextr allows any values, and either uses 0

[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-10 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 --- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org --- (In reply to Uroš Bizjak from comment #5) (In reply to Jakub Jelinek from comment #3) For zero_extract RTL we require that the POS and LEN arguments are in the right ranges,

[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 --- Comment #8 from Uroš Bizjak ubizjak at gmail dot com --- (In reply to Uroš Bizjak from comment #7) Probably I didn't form the question in the right way - I was trying to point out, if we also describe BEXTR without unspec (in a similar way

[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-10 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Keywords||wrong-code

[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-10 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 --- Comment #2 from Uroš Bizjak ubizjak at gmail dot com --- (In reply to Jakub Jelinek from comment #1) Wonder how many other bmi/bmi2 instructions have similar problems. Looking through i386.md file, it looks others are OK, although it is

[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-10 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 --- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org --- For zero_extract RTL we require that the POS and LEN arguments are in the right ranges, while bextr allows any values, and either uses 0 for bits outside of the original operand and

[Bug target/65368] [4.8/4.9/5 Regression]_bzhi_u32 intrinsic generates incorrect code when -O1 or above is specified and index is an immediate

2015-03-10 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65368 --- Comment #4 from Uroš Bizjak ubizjak at gmail dot com --- (In reply to Jakub Jelinek from comment #1) Created attachment 35000 [details] gcc5-pr65368.patch The problem is that the RTL pattern for bzhi doesn't really match what the