This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvmir] Add support for llvm.signext/zeroext function attributes.

Authored by vzakhari on Oct 30 2022, 2:07 PM.



This change-set adds basic support for llvm.signext and llvm.zeroext
attributes, and makes sure that the attributes are translated to LLVM IR
when attached to arguments.

This is needed for

Depends on D137047

Diff Detail

Event Timeline

vzakhari created this revision.Oct 30 2022, 2:07 PM
vzakhari requested review of this revision.Oct 30 2022, 2:07 PM
ftynse accepted this revision.Nov 2 2022, 6:40 AM
ftynse added inline comments.

I see that this is just following the precedent, but could we rather do the verification in LLVM dialect? Dialects have a mechanism for verifying the attributes that use the namespace of the dialect.


Nit: prefer @below to @+1

This revision is now accepted and ready to land.Nov 2 2022, 6:40 AM

Thank you for the review, Alex! I hope you do not mind that I move the verification code in a separate change-set.


Yes, I know that this is a long-standing concern (e.g. I am taking AR to move them all to LLVM dialect verification code in a separate change-set.

vzakhari updated this revision to Diff 472755.Nov 2 2022, 2:06 PM
vzakhari marked an inline comment as done.Nov 2 2022, 2:18 PM