-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla
Description
Bugzilla Link | 3401 |
Resolution | FIXED |
Resolved on | Jan 31, 2009 09:51 |
Version | unspecified |
OS | All |
Reporter | LLVM Bugzilla Contributor |
CC | @lattner,@sunfishcode |
Extended Description
LLVM 2.6svn, x86 code generation.
Here's a small test program:
define void @add(i288, i288, i288*) {
_L1:
%3 = add i288 %0, %1
store i288 %3, i288* %2
ret void
}
And some C code to test it:
#include <stdio.h>
#define N 9
struct big { unsigned int x[N]; };
void add(struct big, struct big, struct big *);
main()
{
struct big a, b, c;
int i;
for (i = 0; i < N; i++) {
a.x[i] = 0x11111111;
b.x[i] = 0x22222222;
c.x[i] = 0x5a5a5a5a;
}
add(a,b,&c);
for (i = N-1; i >= 0; i--)
printf("%08x ", c.x[i]);
printf("\n");
}
This prints
fffffffe 00000000 00000001 ffffffff ffffffff ffffffff ffffffff fffffffe 33333333
which is clearly wrong. Changing i288 to i256 (and N to 8) makes it work.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzilla