[llvm-commits] Pointer subtraction for IRBuilder

Jeffrey Yasskin jyasskin at google.com
Thu Apr 9 16:56:59 PDT 2009


On Thu, Apr 9, 2009 at 3:49 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Thu, Apr 9, 2009 at 2:08 PM, Jeffrey Yasskin <jyasskin at google.com> wrote:
>> The included test passes,
>> but it involves a warning that "ISO C++ forbids casting between
>> pointer-to-function and pointer-to-object", which I don't know how to
>> get rid of given the ExecutionEngine interface.
>
> A unittest of core IR interfaces shouldn't depend on the JIT.  I'd
> suggest manually checking that the expected instructions are
> generated.

I'm happy to do that if you want, but is it really a useful test?
i.e., does having a test that asserts that an sdiv was inserted add
anything to code that says, "CreateSDiv"? Another option would be to
add to the regression test suite instead of the unittest suite.

If you want me to assert against the instructions, is there any more
concise way to do it than a series of isa tests and operand
retrievals?

Thanks,
Jeffrey




More information about the llvm-commits mailing list