[llvm-commits] CVS: llvm/test/Programs/MultiSource/Olden-bh/newbh.c
Chris Lattner
lattner at cs.uiuc.edu
Wed Jun 18 10:06:01 PDT 2003
Changes in directory llvm/test/Programs/MultiSource/Olden-bh:
newbh.c updated: 1.6 -> 1.7
---
Log message:
Remove undefined behavior from the benchmark
---
Diffs of the changes:
Index: llvm/test/Programs/MultiSource/Olden-bh/newbh.c
diff -u llvm/test/Programs/MultiSource/Olden-bh/newbh.c:1.6 llvm/test/Programs/MultiSource/Olden-bh/newbh.c:1.7
--- llvm/test/Programs/MultiSource/Olden-bh/newbh.c:1.6 Tue May 21 16:40:15 2002
+++ llvm/test/Programs/MultiSource/Olden-bh/newbh.c Wed Jun 18 10:05:32 2003
@@ -999,22 +999,28 @@
xsc = (pos[0] - t->rmin[0]) / rsize; /* scale to range [0,1) */
if (0.0 <= xsc && xsc < 1.0) /* within unit interval? */
ic.xp[0] = floor(IMAX * xsc); /* then integerize */
- else /* out of range */
+ else { /* out of range */
ic.inb = FALSE; /* then remember that */
+ ic.xp[0] = 0;
+ }
xsc = (pos[1] - t->rmin[1]) / rsize; /* scale to range [0,1) */
if (0.0 <= xsc && xsc < 1.0) /* within unit interval? */
ic.xp[1] = floor(IMAX * xsc); /* then integerize */
- else /* out of range */
+ else { /* out of range */
ic.inb = FALSE; /* then remember that */
+ ic.xp[1] = 0;
+ }
xsc = (pos[2] - t->rmin[2]) / rsize; /* scale to range [0,1) */
if (0.0 <= xsc && xsc < 1.0) /* within unit interval? */
ic.xp[2] = floor(IMAX * xsc); /* then integerize */
- else /* out of range */
+ else { /* out of range */
ic.inb = FALSE; /* then remember that */
+ ic.xp[2] = 0;
+ }
/*chatting("Returning %d:%d:%d, ic.inb=%d\n",ic.xp[0],ic.xp[1],ic.xp[2],ic.inb);*/
More information about the llvm-commits
mailing list