Bug 37269 - extract_bit_field_1 doesn't handle vector mode properly
Summary: extract_bit_field_1 doesn't handle vector mode properly
Status: RESOLVED DUPLICATE of bug 36444
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-28 20:59 UTC by H.J. Lu
Modified: 2008-08-28 21:49 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2008-08-28 20:59:41 UTC
[hjl@gnu-6 vararg-2]$ cat x.i
__attribute__ ((vector_size (8))) signed char v4, v5, v6;
void
two (void)
{
  v4 = v5 + v6;
}
[hjl@gnu-6 vararg-2]$ make x.s
/export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc-work/build-x86_64-linux/gcc/ -mavx -m32 -S x.i
x.i: In function ‘two’:
x.i:6: internal compiler error: in gen_lowpart_general, at rtlhooks.c:51
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [x.s] Error 1
[hjl@gnu-6 vararg-2]$ 
Starting program: /export/build/gnu/gcc-work/build-x86_64-linux/gcc/cc1 -fpreprocessed x.i -quiet -dumpbase x.i -mavx -m32 -mtune=generic -auxbase x -version -o x.s
GNU C (GCC) version 4.4.0 20080828 (experimental) [trunk revision 139730] (x86_64-unknown-linux-gnu)
	compiled by GNU C version 4.3.0 20080428 (Red Hat 4.3.0-8), GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 86b79a008cee0f5fea850c16d9990a89

Breakpoint 1, fancy_abort (
    file=0xf56328 "/export/gnu/src/gcc-work/gcc/gcc/rtlhooks.c", line=51, 
    function=0xf56310 "gen_lowpart_general")
    at /export/gnu/src/gcc-work/gcc/gcc/diagnostic.c:699
699	  internal_error ("in %s, at %s:%d", function, trim_filename (file), line);
(gdb) f 2
#2  0x00000000005e3e1f in extract_bit_field_1 (str_rtx=0x7ffff3286140, 
    bitsize=32, bitnum=0, unsignedp=1, target=0x7ffff32860e0, mode=SImode, 
    tmode=SImode, fallback_p=1 '\001')
    at /export/gnu/src/gcc-work/gcc/gcc/expmed.c:1205
1205		op0 = gen_lowpart (new_mode, op0);
(gdb) call debug_rtx (str_rtx)
(reg:V8QI 78 [ v5.0 ])
(gdb) p new_mode
$1 = V8SImode
(gdb) call debug_rtx (op0)
(reg:V8QI 78 [ v5.0 ])
(gdb) 

AVX happens to have V8SImode. But there is no subreg of V8SImode
from V8QImode.
Comment 1 Andrew Pinski 2008-08-28 21:03:13 UTC
What happens if you try the patch in PR 36444 comment #1.
Comment 2 H.J. Lu 2008-08-28 21:13:03 UTC
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2008-08/msg02197.html
Comment 3 H.J. Lu 2008-08-28 21:49:36 UTC

*** This bug has been marked as a duplicate of 36444 ***