diff --git a/gcc/testsuite/c-c++-common/rotate-1.c b/gcc/testsuite/c-c++-common/rotate-1.c
index afdaa28..bca9dd8 100644
--- a/gcc/testsuite/c-c++-common/rotate-1.c
+++ b/gcc/testsuite/c-c++-common/rotate-1.c
@@ -1,6 +1,6 @@
 /* Check rotate pattern detection.  */
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
 /* { dg-final { scan-tree-dump-times "r\[<>]\[<>]" 96 "optimized" } } */
 /* { dg-final { cleanup-tree-dump "optimized" } } */
 
diff --git a/gcc/testsuite/c-c++-common/rotate-2.c b/gcc/testsuite/c-c++-common/rotate-2.c
index 109fd32..4ffa218 100644
--- a/gcc/testsuite/c-c++-common/rotate-2.c
+++ b/gcc/testsuite/c-c++-common/rotate-2.c
@@ -1,6 +1,6 @@
 /* Check rotate pattern detection.  */
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
 /* Rotates should be recognized only in functions with | instead of + or ^,
    or in functions that have constant shift counts (unused attribute on y).  */
 /* { dg-final { scan-tree-dump-times "r\[<>]\[<>]" 48 "optimized" } } */
diff --git a/gcc/testsuite/c-c++-common/rotate-3.c b/gcc/testsuite/c-c++-common/rotate-3.c
index 8dc8313..aaa9f50 100644
--- a/gcc/testsuite/c-c++-common/rotate-3.c
+++ b/gcc/testsuite/c-c++-common/rotate-3.c
@@ -1,6 +1,6 @@
 /* Check rotate pattern detection.  */
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
 /* { dg-final { scan-tree-dump-times "r\[<>]\[<>]" 96 "optimized" } } */
 /* { dg-final { cleanup-tree-dump "optimized" } } */
 
diff --git a/gcc/testsuite/c-c++-common/rotate-4.c b/gcc/testsuite/c-c++-common/rotate-4.c
index 2f433b3..0a21177 100644
--- a/gcc/testsuite/c-c++-common/rotate-4.c
+++ b/gcc/testsuite/c-c++-common/rotate-4.c
@@ -1,6 +1,6 @@
 /* Check rotate pattern detection.  */
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
 /* Rotates should be recognized only in functions with | instead of + or ^,
    or in functions that have constant shift counts (unused attribute on y).  */
 /* { dg-final { scan-tree-dump-times "r\[<>]\[<>]" 48 "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-return.C b/gcc/testsuite/g++.dg/cpp0x/rv-return.C
index 12a15aa..6d57209 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-return.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-return.C
@@ -1,5 +1,6 @@
 // PR c++/41815
 // { dg-do compile { target c++11 } }
+// { dg-options "-fno-ipa-icf" }
 
 template<typename T, typename U> struct same_type;
 template<typename T> struct same_type<T, T> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv1n.C b/gcc/testsuite/g++.dg/cpp0x/rv1n.C
index 204ca31..f5e7568 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv1n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv1n.C
@@ -1,8 +1,10 @@
 // I, Howard Hinnant, hereby place this code in the public domain.
+/* { dg-additional-options "-fno-ipa-icf" } */
 
 // Test overload resolution among reference types
 
 // { dg-do compile { target c++11 } }
+// { dg-additional-options "-fno-ipa-icf" }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv1p.C b/gcc/testsuite/g++.dg/cpp0x/rv1p.C
index e4c0ab1..e87ec0e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv1p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv1p.C
@@ -4,6 +4,7 @@
 
 // { dg-do compile { target c++11 } }
 // { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
+// { dg-additional-options "-fno-ipa-icf" }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv2n.C b/gcc/testsuite/g++.dg/cpp0x/rv2n.C
index 9677f58..663a66b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv2n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv2n.C
@@ -3,7 +3,7 @@
 // Test overload resolution among reference types
 
 // { dg-do compile { target c++11 } }
-// { dg-options "" }
+// { dg-options "-fno-ipa-icf" }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv3n.C b/gcc/testsuite/g++.dg/cpp0x/rv3n.C
index 8a1730b..b7c1d7a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv3n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv3n.C
@@ -3,7 +3,7 @@
 // Test overload resolution among reference types
 
 // { dg-do compile { target c++11 } }
-// { dg-options "" }
+// { dg-options "-fno-ipa-icf" }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv4n.C b/gcc/testsuite/g++.dg/cpp0x/rv4n.C
index e64856d..29deb3f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv4n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv4n.C
@@ -3,7 +3,7 @@
 // Test overload resolution among reference types
 
 // { dg-do compile { target c++11 } }
-// { dg-options "" }
+// { dg-options "-fno-ipa-icf" }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv5n.C b/gcc/testsuite/g++.dg/cpp0x/rv5n.C
index 90d5418..f11d07a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv5n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv5n.C
@@ -3,7 +3,7 @@
 // Test overload resolution among reference types
 
 // { dg-do compile { target c++11 } }
-// { dg-options "" }
+// { dg-options "-fno-ipa-icf" }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv6n.C b/gcc/testsuite/g++.dg/cpp0x/rv6n.C
index 5bd9a23..0ebbe33 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv6n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv6n.C
@@ -3,7 +3,7 @@
 // Test overload resolution among reference types
 
 // { dg-do compile { target c++11 } }
-// { dg-options "" }
+// { dg-options "-fno-ipa-icf" }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv7n.C b/gcc/testsuite/g++.dg/cpp0x/rv7n.C
index 38ca7b8..d9e371b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv7n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv7n.C
@@ -3,7 +3,7 @@
 // Test overload resolution among reference types
 
 // { dg-do compile { target c++11 } }
-// { dg-options "" }
+// { dg-options "-fno-ipa-icf" }
 
 template <bool> struct sa;
 template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/opt/pr30965.C b/gcc/testsuite/g++.dg/opt/pr30965.C
index 91bb55c..45393fd 100644
--- a/gcc/testsuite/g++.dg/opt/pr30965.C
+++ b/gcc/testsuite/g++.dg/opt/pr30965.C
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -fdump-tree-optimized" } */
+/* { dg-options "-O3 -fno-ipa-icf -fdump-tree-optimized" } */
 
 #include <tr1/functional>
 #include <algorithm>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr19637.C b/gcc/testsuite/g++.dg/tree-ssa/pr19637.C
index 2d1dcce..92f673f 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr19637.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr19637.C
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom1" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-dom1" } */
 
 #include <new>
 
diff --git a/gcc/testsuite/gcc.dg/guality/csttest.c b/gcc/testsuite/gcc.dg/guality/csttest.c
index 4480c71..05e1ad7 100644
--- a/gcc/testsuite/gcc.dg/guality/csttest.c
+++ b/gcc/testsuite/gcc.dg/guality/csttest.c
@@ -1,6 +1,6 @@
 /* PR debug/49676 */
 /* { dg-do run { target lp64 } } */
-/* { dg-options "-g" } */
+/* { dg-options "-g -fno-ipa-icf" } */
 
 volatile int v;
 
diff --git a/gcc/testsuite/gcc.dg/ipa/iinline-4.c b/gcc/testsuite/gcc.dg/ipa/iinline-4.c
index 71faae2..3f295df 100644
--- a/gcc/testsuite/gcc.dg/ipa/iinline-4.c
+++ b/gcc/testsuite/gcc.dg/ipa/iinline-4.c
@@ -1,7 +1,7 @@
 /* Verify that simple indirect calls are inlined even without early
    inlining..  */
 /* { dg-do compile } */
-/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining"  } */
+/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-icf"  } */
 
 struct S
 {
diff --git a/gcc/testsuite/gcc.dg/ipa/iinline-7.c b/gcc/testsuite/gcc.dg/ipa/iinline-7.c
index c95d374..61e8d0b 100644
--- a/gcc/testsuite/gcc.dg/ipa/iinline-7.c
+++ b/gcc/testsuite/gcc.dg/ipa/iinline-7.c
@@ -1,7 +1,7 @@
 /* Verify that simple indirect calls are inlined even without early
    inlining..  */
 /* { dg-do run } */
-/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining"  } */
+/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-icf"  } */
 
 extern void abort (void);
 
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-pta-13.c b/gcc/testsuite/gcc.dg/ipa/ipa-pta-13.c
index 0f46e98..f7f95f4 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-pta-13.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-pta-13.c
@@ -1,5 +1,5 @@
 /* { dg-do link } */
-/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre2" } */
+/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details -fdump-tree-fre2 -fno-ipa-icf" } */
 
 static int x, y;
 
diff --git a/gcc/testsuite/gcc.dg/ipa/ipacost-1.c b/gcc/testsuite/gcc.dg/ipa/ipacost-1.c
index 4fce41e..9603afe 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipacost-1.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipacost-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-Os -fipa-cp -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized"  } */
+/* { dg-options "-Os -fipa-cp -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized -fno-ipa-icf"  } */
 
 int array[100];
 
diff --git a/gcc/testsuite/gcc.dg/ipa/ipacost-2.c b/gcc/testsuite/gcc.dg/ipa/ipacost-2.c
index ceb524e..e7074f1 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipacost-2.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipacost-2.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized"  } */
+/* { dg-options "-O3 -fipa-cp -fipa-cp-clone -fdump-ipa-cp -fno-early-inlining -fdump-tree-optimized -fno-ipa-icf"  } */
 /* { dg-add-options bind_pic_locally } */
 
 int array[100];
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-6.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-6.c
index 050e13b..5d6425b 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-6.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-6.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details -fdump-tree-optimized-slim"  } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details -fdump-tree-optimized-slim -fno-ipa-icf"  } */
 /* { dg-add-options bind_pic_locally } */
 
 struct S
diff --git a/gcc/testsuite/gcc.dg/ipa/remref-2a.c b/gcc/testsuite/gcc.dg/ipa/remref-2a.c
index 1e0df2e..4697a18 100644
--- a/gcc/testsuite/gcc.dg/ipa/remref-2a.c
+++ b/gcc/testsuite/gcc.dg/ipa/remref-2a.c
@@ -1,7 +1,7 @@
 /* Verify that indirect inlining can also remove references of the functions it
    discovers calls for.  */
 /* { dg-do compile } */
-/* { dg-options "-O3 -fno-early-inlining -fno-ipa-cp -fdump-ipa-inline -fdump-tree-optimized"  } */
+/* { dg-options "-O3 -fno-early-inlining -fno-ipa-cp -fdump-ipa-inline -fdump-tree-optimized -fno-ipa-icf"  } */
 
 int global;
 
diff --git a/gcc/testsuite/gcc.dg/ipa/remref-2b.c b/gcc/testsuite/gcc.dg/ipa/remref-2b.c
index 554f306..7799033 100644
--- a/gcc/testsuite/gcc.dg/ipa/remref-2b.c
+++ b/gcc/testsuite/gcc.dg/ipa/remref-2b.c
@@ -2,7 +2,7 @@
    discovers calls for, even when nodes being inlined are virtual IPA-CP
    clones.  */
 /* { dg-do compile } */
-/* { dg-options "-O3 -fno-early-inlining -fdump-ipa-cp-details -fdump-ipa-inline -fdump-tree-optimized"  } */
+/* { dg-options "-O3 -fno-early-inlining -fdump-ipa-cp-details -fdump-ipa-inline -fdump-tree-optimized -fno-ipa-icf"  } */
 
 
 int global;
diff --git a/gcc/testsuite/gcc.dg/pr46309-2.c b/gcc/testsuite/gcc.dg/pr46309-2.c
index f407e66..00ffee1 100644
--- a/gcc/testsuite/gcc.dg/pr46309-2.c
+++ b/gcc/testsuite/gcc.dg/pr46309-2.c
@@ -1,6 +1,6 @@
 /* PR tree-optimization/46309 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-reassoc-details" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-reassoc-details" } */
 
 int foo (void);
 
diff --git a/gcc/testsuite/gcc.dg/torture/ipa-pta-1.c b/gcc/testsuite/gcc.dg/torture/ipa-pta-1.c
index aae987d..80303a5 100644
--- a/gcc/testsuite/gcc.dg/torture/ipa-pta-1.c
+++ b/gcc/testsuite/gcc.dg/torture/ipa-pta-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { nonpic } } } */
-/* { dg-options "-fipa-pta -fdump-ipa-pta" } */
+/* { dg-options "-fipa-pta -fdump-ipa-pta -fno-ipa-icf" } */
 /* { dg-skip-if "" { *-*-* } { "-O0" "-fno-fat-lto-objects" } { "" } } */
 
 struct X { char x; char y; };
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/andor-3.c b/gcc/testsuite/gcc.dg/tree-ssa/andor-3.c
index a1401c0..8b2f206 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/andor-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/andor-3.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
 
 int f(int y, int x)
 {
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/andor-4.c b/gcc/testsuite/gcc.dg/tree-ssa/andor-4.c
index 1dbdca7..46a4826 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/andor-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/andor-4.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
 
 int f(int y, int x)
 {
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/andor-5.c b/gcc/testsuite/gcc.dg/tree-ssa/andor-5.c
index 1509727..929851c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/andor-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/andor-5.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */
 
 int f(int y, int x)
 {
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c b/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c
index e475fff..5896271 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-pr29145.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-fno-ipa-icf" } */
 
 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-10.c b/gcc/testsuite/gcc.dg/vect/vect-cond-10.c
index 687d42f..da2eb05 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-10.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-10.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target vect_cond_mixed } */
+/* { dg-additional-options "-fno-ipa-icf" } */
 
 #include "tree-vect.h"
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-9.c b/gcc/testsuite/gcc.dg/vect/vect-cond-9.c
index cfa0363..de88fc5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-9.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-9.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target vect_cond_mixed } */
+/* { dg-additional-options "-fno-ipa-icf" } */
 
 #include "tree-vect.h"
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c
index a2fe975..895bbd0 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-fno-ipa-icf" } */
 
 #include "tree-vect.h"
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c
index e712da9..f69abfd 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-fno-ipa-icf" } */
 
 #include "tree-vect.h"
 #include <stdlib.h>
@@ -74,4 +75,3 @@ int main (void)
 /* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 /* { dg-final { scan-tree-dump-times "pattern recognized" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
-
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
index 39078df..3f07585 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-fno-ipa-icf" } */
 
 #include "tree-vect.h"
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/i386/bmi-1.c b/gcc/testsuite/gcc.target/i386/bmi-1.c
index c66a9d8..738705e 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-1.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-1.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mbmi " } */
+/* { dg-options "-O2 -fno-ipa-icf -mbmi " } */
 /* { dg-final { scan-assembler "andn\[^\\n]*eax" } } */
 /* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*eax" 2 } } */
 /* { dg-final { scan-assembler-times "blsi\[^\\n]*eax" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/bmi-2.c b/gcc/testsuite/gcc.target/i386/bmi-2.c
index 6eea66a..25fb86b 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-2.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-2.c
@@ -1,5 +1,5 @@
 /* { dg-do compile { target { ! { ia32 }  } } } */
-/* { dg-options "-O2 -mbmi " } */
+/* { dg-options "-O2 -fno-ipa-icf -mbmi " } */
 /* { dg-final { scan-assembler "andn\[^\\n]*rax" } } */
 /* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*rax" 2 } } */
 /* { dg-final { scan-assembler-times "blsi\[^\\n]*rax" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr56564-2.c b/gcc/testsuite/gcc.target/i386/pr56564-2.c
index fc89a4c..c42bfae 100644
--- a/gcc/testsuite/gcc.target/i386/pr56564-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr56564-2.c
@@ -1,6 +1,6 @@
 /* PR target/56564 */
 /* { dg-do compile { target { *-*-linux* && lp64 } } } */
-/* { dg-options "-O3 -fno-pic -fdump-tree-optimized" } */
+/* { dg-options "-O3 -fno-pic -fno-ipa-icf -fdump-tree-optimized" } */
 
 struct S { long a, b; } s = { 5, 6 };
 char t[16] = { 7 };
