This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/63483] Scheduler performs Invalid move of aliased memory reference
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Oct 2014 15:30:26 +0000
- Subject: [Bug target/63483] Scheduler performs Invalid move of aliased memory reference
- Auto-submitted: auto-generated
- References: <bug-63483-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63483
--- Comment #11 from UroÅ Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #10)
> Ok, I believe that even
>
> char * const a;
> int * const b;
>
> void foo (void)
> {
> a[1] = 1;
> b[2] = 1;
> }
>
> int bar (void)
> {
> return a && b;
> }
>
> does not reproduces the issue.
>
> $foo..ng:
> .prologue 1
> ldq $1,a($29) !literal
> ldq $2,0($1)
> ldq $1,b($29) !literal
> bis $31,$31,$31
> lda $4,1($2)
> ldq_u $3,1($2)
> ldq $5,0($1) <- this is (insn 15)
> lda $1,1($31)
> insbl $1,$4,$1
> mskbl $3,$4,$3
> bis $1,$3,$1
> stq_u $1,1($2) <- this is (insn 13)
> lda $1,1($31)
> stl $1,8($5)
> ret $31,($26),1
$foo..ng:
.prologue 1
lda $1,a # 5 *movdi/7 [length = 4]
ldq $2,0($1) # 6 *movdi/8 [length = 4]
lda $1,b # 23 *movdi/7 [length = 4]
bis $31,$31,$31 # 31 nop [length = 4]
lda $4,1($2) # 9 *adddi_internal/2 [length = 4]
ldq_u $3,1($2) # 8 *movdi/8 [length = 4]
ldq $5,0($1) # 15 *movdi/8 [length = 4]
lda $1,1($31) # 22 *movqi/2 [length = 4]
insbl $1,$4,$1 # 11 insbl [length = 4]
mskbl $3,$4,$3 # 10 mskxl [length = 4]
bis $1,$3,$1 # 12 iordi3/1 [length = 4]
stq_u $1,1($2) # 13 *movdi/9 [length = 4]
lda $1,1($31) # 21 *movsi/2 [length = 4]
stl $1,8($5) # 17 *movsi/6 [length = 4]
ret $31,($26),1 # 30 *return_internal [length = 4]
5: $1:DI=`a'
REG_EQUIV `a'
6: $2:DI=[$1:DI]
REG_DEAD $1:DI
23: $1:DI=`b'
REG_EQUIV `b'
31: 0
9: $4:DI=$2:DI+0x1
8: $3:DI=[$2:DI+0x1&0xfffffffffffffff8]
15: $5:DI=[$1:DI]
REG_DEAD $1:DI
22: $1:QI=0x1
REG_EQUIV 0x1
11: $1:DI=zero_extend($1:QI)<<$4:DI<<0x3
REG_EQUAL 0x1<<$4:DI<<0x3
10: $3:DI=!0xff<<$4:DI<<0x3&$3:DI
REG_DEAD $4:DI
12: $1:DI=$1:DI|$3:DI
REG_DEAD $3:DI
13: [$2:DI+0x1&0xfffffffffffffff8]=$1:DI
REG_DEAD $2:DI
REG_DEAD $1:DI
21: $1:SI=0x1
REG_EQUIV 0x1
17: [$5:DI+0x8]=$1:SI
REG_DEAD $5:DI
REG_DEAD $1:SI
30: return
29: barrier
20: NOTE_INSN_DELETED
24: NOTE_INSN_DELETED
My dumps were with -mexplicit-relocs for some reason, the above are with
-mno-explicit-relocs.