[PATCH] D157518: Avoid running optimization passes in frontend test

Matthias Braun via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 5 11:22:01 PDT 2023


MatzeB marked 2 inline comments as done.
MatzeB added inline comments.


================
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]]}
----------------
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.


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