This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/11599] New: ia64: gcc generates wrong code when predicate is used
- From: "hjl at lucon dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jul 2003 23:40:34 -0000
- Subject: [Bug target/11599] New: ia64: gcc generates wrong code when predicate is used
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11599
Summary: ia64: gcc generates wrong code when predicate is used
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Keywords: wrong-code
Severity: critical
Priority: P1
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl at lucon dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-unknown-linux-gnu
GCC host triplet: ia64-unknown-linux-gnu
GCC target triplet: ia64-unknown-linux-gnu
[hjl@gnu-3 predicate]$ cat bar.i
void
prefetch (void *p, int s)
{
if (s)
__builtin_prefetch (p, 1, 1);
}
[hjl@gnu-3 predicate]$ make
/usr/gcc-3.4/bin/gcc -Wall -O bar.i -S
[hjl@gnu-3 predicate]$ cat bar.s
.pred.safe_across_calls p1-p5,p16-p63
.text
.align 16
.global prefetch#
.proc prefetch#
prefetch:
.prologue
.body
cmp4.eq p6, p7 = 0, r33
;;
lfetch.excl.nt1 [r32]
br.ret.sptk.many rp
;;
.endp prefetch#
The problem is there is no (p7) before "lfetch.excl.nt1 [r32]". That means
__builtin_prefetch (p, 1, 1);
is always executed even if 's' is 0.