This is an archive of the discontinued LLVM Phabricator instance.

[IR] Clarify that expect intrinsics may take vector types
Needs ReviewPublic

Authored by frasercrmck on Feb 28 2023, 2:58 AM.

Details

Summary

This wasn't clear in the LangRef, nor was it tested.

The LowerExpectIntrinsic pass doesn't currently add branch weights to
those intrinsics using vector types, but the intrinsics are still
lowered.

Diff Detail

Event Timeline

frasercrmck created this revision.Feb 28 2023, 2:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 2:58 AM
frasercrmck requested review of this revision.Feb 28 2023, 2:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 2:58 AM
nikic added a subscriber: nikic.Feb 28 2023, 3:01 AM

I doubt that this was an intended feature -- just a side effect of how the intrinsic type constraints work. They always assume vectors are allowed for llvm_anyint_ty.

I doubt that this was an intended feature -- just a side effect of how the intrinsic type constraints work. They always assume vectors are allowed for llvm_anyint_ty.

Yeah, I suspect so too. I think there are legitimate uses of the vector forms, though; better vectorization is one of them. Conceptually I don't see a problem with vector forms, either.