[PATCH] D157518: Avoid running optimization passes in frontend test
Wenlei He via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 5 11:35:12 PDT 2023
wenlei accepted this revision.
wenlei added a comment.
lgtm, thanks.
================
Comment at: clang/test/CodeGenCXX/attr-likelihood-if-branch-weights.cpp:147-148
-// CHECK: ![[PROF_LIKELY]] = !{!"branch_weights", i32 [[UNLIKELY]], i32 [[LIKELY]]}
-// CHECK: ![[PROF_UNLIKELY]] = !{!"branch_weights", i32 [[LIKELY]], i32 [[UNLIKELY]]}
----------------
MatzeB wrote:
> aeubanks wrote:
> > wenlei wrote:
> > > I thought this is the purpose of the test, which is no longer checked after change?
> > those should be covered by LowerExpectIntrinsic tests
> The frontend rewrites `[[likely]]` and `[[unlikely]]` into calls to `llvm.expect`. And this is still tested here. Running `lower-expect-intrinsic` pass to lower the `llvm.expect` to `!prof` annotations doesn't need to be tested here as we have separate tests for that pass.
Ah, makes sense. I see that we have existing coverage for lowering `llvm.expect` to `!prof` in `expect-*.ll`, so we're good.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157518/new/
https://reviews.llvm.org/D157518
More information about the cfe-commits
mailing list