Mara Sophie Grosch via llvm-dev
unread,Oct 24, 2021, 12:50:12 PM10/24/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Craig Topper, cfe...@lists.llvm.org, llvm...@lists.llvm.org
Changing to an i16 is not going to work, sadly. But I can think the
other things you wrote will help me going forward - thank you :)
Am Sun, Oct 24, 2021 at 09:45:02AM -0700 schrieb Craig Topper:
>The C to IR conversion happens in CGBuiltin.cpp where it calls
>Intrinsic::getIntrinsicForGCCBuiltin.
>
>The error your getting is coming from SelectionDAG. The error seems to
>indicate that i32 is not a legal type for the AVR and
>LegalizeIntegerTypes.cpp does know how to make it legal. It wants to split
>into 2 i16s but it doesn’t know how. Intrinsics with illegal types are
>usually handled by adding setOperationAction(ISD::INTRINSIC_W_CHAIN,
>MVT::i32, Custom) to the AVRTargetLowering constructor. And then adding a
>case for INTRINSIC_W_CHAIN to AVRTargetLowering::LowerOperation to detect
>the specific intrinsic and handle it.
>
>Alternatively you chang the intrinsic to use i16 instead of i32 if that
>meets your needs.
>
>On Sun, Oct 24, 2021 at 9:28 AM Mara Sophie Grosch <
litt...@lf-net.org>
>wrote:
>
>> that's good to know, thank you. Where is the code generation for those
>> intrinsics then?
>>
>> Am Sun, Oct 24, 2021 at 09:23:34AM -0700 schrieb Craig Topper:
>--
>~Craig