[all-commits] [llvm/llvm-project] 449813: [flang] Rewrite test for CPU_TIME

Diana via All-commits all-commits at lists.llvm.org
Fri Jun 18 02:21:18 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4498137bd7857c07921b4cd6313baac62ead24e2
      https://github.com/llvm/llvm-project/commit/4498137bd7857c07921b4cd6313baac62ead24e2
  Author: Diana Picus <diana.picus at linaro.org>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M flang/unittests/RuntimeGTest/Time.cpp

  Log Message:
  -----------
  [flang] Rewrite test for CPU_TIME

Don't rely on volatile writes to keep the CPU busy - it seems MSVC
optimizes them out, so we don't get different values for 'start' and
'end' on Windows. Rewrite the test to loop until we get a different
value for 'end'.

Fix suggested by Michael Kruse in
https://reviews.llvm.org/rG57e85622bbdb2eb18cc03df2ea457019c58f6912#inline-6002

Committing to fix the Windows buildbot, post-commit comments welcome!




More information about the All-commits mailing list