Build the test case in the patch file with -finstrument-functions, the link will fail with unsat. The problem is gcc instruments the artificial wrappers that will won't be emitted. The patch fixes the problem. Bootstrap and tested on x86-64/linux.
Ok for mainline? thanks, David
Index: gimplify.c
===================================================================
--- gimplify.c (revision 182083)
+++ gimplify.c (working copy)
@@ -8048,6 +8048,12 @@ flag_instrument_functions_exclude_p (tre
return true;
}
+ /* Avoid instrumenting wrapper functions to builtins. */
+
+ if (DECL_DISREGARD_INLINE_LIMITS (fndecl)
+ && lookup_attribute ("always_inline", DECL_ATTRIBUTES (fndecl)))
+ return true;
+
return false;
}
Index: testsuite/gcc.target/i386/instrument-func.c
===================================================================
--- testsuite/gcc.target/i386/instrument-func.c (revision 0)
+++ testsuite/gcc.target/i386/instrument-func.c (revision 0)
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-require-effective-target sse } */
+/* { dg-options "-O2 -msse -finstrument-functions" } */
+
+#include <xmmintrin.h>
+
+__attribute__((noinline)) __m128 foo( float *row, int x)
+{
+ __m128 vals = _mm_loadu_ps(row + x);
+ return vals;
+}
+
+int main()
+{
+ float f[10];
+ foo(f, 5);
+ return 0;
+}
cg1
Description: Binary data
cg2
Description: Binary data
