[PATCH] D89204: Make likelihood lit test less brittle

Mark de Wever via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Oct 11 07:36:51 PDT 2020


Mordante created this revision.
Mordante added a reviewer: jmorse.
Mordante added a project: clang.
Mordante requested review of this revision.

Jeremy Morse discovered an issue with the lit test introduced in D88363 <https://reviews.llvm.org/D88363>. The test gives different results for Sony's `-O1`.

The test needs to run at `-O1` otherwise the likelihood attribute will be ignored. Instead of running all `-O1` passes it only runs the lower-expect pass which is needed to lower `__builtin_expect`.

@jmorse  can you verify this fixes Sony's issue?


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D89204

Files:
  clang/test/CodeGenCXX/attr-likelihood-if-vs-builtin-expect.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89204.297460.patch
Type: text/x-patch
Size: 5898 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201011/d36be693/attachment.bin>


More information about the cfe-commits mailing list