This is an archive of the discontinued LLVM Phabricator instance.

Mips: Add ImmArg to intrinsics
ClosedPublic

Authored by arsenm on Feb 18 2019, 8:01 AM.

Details

Reviewers
atanasyan
Summary

I found these by asserting in clang for any GCCBuiltin that doesn't
require mangling and requires a constant for the builtin. This means
that intrinsics are missing which don't use GCCBuiltin, don't have
builtins defined in clang, or were missing the constant annotation in
the builtin definition.

I'm not sure what's going on with the immediates.ll test. It seems to
be intended to test invalid cases like this, but then tries to handle
some of them anyway. I've moved the cases that were inconsistent with
the GCCBuiltin definition so they don't test the codegen anymore.

Diff Detail

Event Timeline

arsenm created this revision.Feb 18 2019, 8:01 AM

Thanks for pointing to the problem. Could you provide the "assertion" used for finding the issue?

Unfortunately the current patch shows the error on compilation:

llvm/include/llvm/IR/IntrinsicsMips.td:237:46: error: Expected a class name, got 'ImmArg'
  Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [ImmArg<1>]>;
                                             ^

Unfortunately the current patch shows the error on compilation:

I saw the parent revision. Now the patch compiled.

Thanks for pointing to the problem. Could you provide the "assertion" used for finding the issue?

Unfortunately the current patch shows the error on compilation:

llvm/include/llvm/IR/IntrinsicsMips.td:237:46: error: Expected a class name, got 'ImmArg'
  Intrinsic<[], [llvm_i32_ty, llvm_i32_ty], [ImmArg<1>]>;
                                             ^

I posted the hack here: D58449

This revision is now accepted and ready to land.Feb 20 2019, 7:22 AM
arsenm closed this revision.Mar 13 2019, 12:06 PM

r356085