This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/70509] New: wrong code with extract from a casted vector(64)
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Apr 2016 21:37:30 +0000
- Subject: [Bug tree-optimization/70509] New: wrong code with extract from a casted vector(64)
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70509
Bug ID: 70509
Summary: wrong code with extract from a casted vector(64)
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Target: x86_64-pc-linux-gnu
Created attachment 38159
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38159&action=edit
reduced testcase
Output:
$ gcc -O -mavx512bw testcase.c
$ sde64 -- ./a.out
00000008
Aborted
First broken dump seems to be .forwprop, where is:
_2 = VIEW_CONVERT_EXPR<vector(64) charD.7>(v_1(D));
_4 = VEC_PERM_EXPR <_2, _2, { 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32 }>;
_9 = BIT_FIELD_REF <u_8(D), 8, 0>;
_10 = BIT_FIELD_REF <_2, 8, 0>;
_11 = _9 / _10;
It extracts from _2 offset 0 instead of 256. -fno-tree-forwprop fixes the
testcase.