[compiler-rt] r280365 - Fix profile test assuming dumb compiler

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 1 06:45:48 PDT 2016


Author: rengolin
Date: Thu Sep  1 08:45:47 2016
New Revision: 280365

URL: http://llvm.org/viewvc/llvm-project?rev=280365&view=rev
Log:
Fix profile test assuming dumb compiler

Commit r280364 has introduced some call-graph optmisations making a profiler
test "fail" due to not expecting the compiler to be "smart", and fold constants
across functions. This commit works around the issue, leaving the origial
semantics intact.

Modified:
    compiler-rt/trunk/test/profile/Linux/instrprof-cs.c

Modified: compiler-rt/trunk/test/profile/Linux/instrprof-cs.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Linux/instrprof-cs.c?rev=280365&r1=280364&r2=280365&view=diff
==============================================================================
--- compiler-rt/trunk/test/profile/Linux/instrprof-cs.c (original)
+++ compiler-rt/trunk/test/profile/Linux/instrprof-cs.c Thu Sep  1 08:45:47 2016
@@ -11,7 +11,7 @@
 // Check context insenstive profile
 // RUN: %clang_profuse=%t.cis.profdata  -O2 -emit-llvm -S %s -o - | FileCheck %s --check-prefix=CIS
 int g1 = 1;
-int g2 = 2;
+int volatile g2 = 2;
 static void toggle(int t) {
   if (t & 1)
     g1 *= t;




More information about the llvm-commits mailing list