This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/70509] wrong code with extract from a v64qi
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 03 Apr 2016 09:13:57 +0000
- Subject: [Bug tree-optimization/70509] wrong code with extract from a v64qi
- Auto-submitted: auto-generated
- References: <bug-70509-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70509
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-04-03
CC| |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Zdenek Sojka from comment #4)
> (In reply to Marc Glisse from comment #3)
> > Rereading this a few years later, I have no idea why I used that type.
> > bitsize_int would make more sense...
>
> I've already tried this:
> - index = build_int_cst (TREE_TYPE (TREE_TYPE (m)), idx * size);
> tem = build3 (BIT_FIELD_REF, TREE_TYPE (op),
> - unshare_expr (p), op1, index);
> + unshare_expr (p), op1, bitsize_int(idx * size));
Please put space in between bitsize_int and (. Otherwise LGTM, but testcase
needs to be added too, see how testsuite/gcc.target/i386/avx512bw-*.c dg-do run
tests look like. Please post to gcc-patches once you have that.
- if (sel & (1 << UINTVAL (j)))
+ if (sel & (HOST_WIDE_INT_1U << UINTVAL (j)))
change in simplify-rtx.c is preapproved, but it would be nice to have a
testcase.