[llvm-commits] [PATCH] bug 6028: fix interpreter assertion on use of undefined integer value

Nick Lewycky nicholas at mxc.ca
Thu Jan 14 09:10:15 PST 2010


Jay Foad wrote:
> The attached patch fixes bug 6028. I've only tested it on the test
> case cited in the bug. What other testing can I do that will exercise
> the interpreter?

Always make sure to run 'make check' before committing any change. If 
you're paranoid, you can also try out a nightly build before and after, 
but I don't think we care that much :) The nightly test has many 
failures due to things like taking addresses of functions and passing 
them around (to qsort for example).

> Or, OK to apply?

Why care about the type? Why not just:

   if (isa<UndefValue>(C)) {
     GenericValue Result;
     Result.IntVal = APInt(C->getType()->getPrimitiveSizeInBits(), 0);
     return Result;
   }

?

Nick



More information about the llvm-commits mailing list