Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

[clang] Support elementwise builtin for sizeless vector type
Needs ReviewPublic

Authored by jacquesguan on Aug 21 2023, 8:23 PM.

Diff Detail

Event Timeline

jacquesguan created this revision.Aug 21 2023, 8:23 PM
jacquesguan requested review of this revision.Aug 21 2023, 8:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2023, 8:23 PM

remove unused cases

paulwalker-arm added inline comments.Aug 24 2023, 2:51 AM

These should be smin rather than umin?


This highlights a potential sticking point because can we code generate such intrinsics for scalable vectors? LoopVectorize will emit calls to a vector math library rather than call this intrinsic directly. There's also the replace-with-veclib pass that will convert such intrinsics, again only if there's a suitable math library available.

Is it a good idea to allow builtins that we know will cause a code generation failure? Or might result in a scalarised implementation?