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.
Paths
| Differential D144951
[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
Diff Detail
Event TimelineComment Actions 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. Comment Actions
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.
Revision Contents
Diff 501064 llvm/docs/LangRef.rst
llvm/test/Transforms/LowerExpectIntrinsic/basic.ll
llvm/test/Transforms/LowerExpectIntrinsic/expect-with-probability.ll
|