[Bug target/11599] New: ia64: gcc generates wrong code when predicate is used
hjl at lucon dot org
gcc-bugzilla@gcc.gnu.org
Sat Jul 19 23:40:00 GMT 2003
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.
More information about the Gcc-bugs
mailing list