diff --git a/gcc/config/i386/adxintrin.h b/gcc/config/i386/adxintrin.h
index e01b77ddb4b..e8cb004390c 100644
--- a/gcc/config/i386/adxintrin.h
+++ b/gcc/config/i386/adxintrin.h
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED
-# error "Never use <adxintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <adxintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _ADXINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/clflushoptintrin.h b/gcc/config/i386/clflushoptintrin.h
index 1e720c2515c..89aa0f68fc2 100644
--- a/gcc/config/i386/clflushoptintrin.h
+++ b/gcc/config/i386/clflushoptintrin.h
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <clflushoptintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <clflushoptintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _CLFLUSHOPTINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/clwbintrin.h b/gcc/config/i386/clwbintrin.h
index 217fb3babf2..68b20ea1635 100644
--- a/gcc/config/i386/clwbintrin.h
+++ b/gcc/config/i386/clwbintrin.h
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <clwbintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <clwbintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _CLWBINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/fxsrintrin.h b/gcc/config/i386/fxsrintrin.h
index ff6c6f848eb..c4b12cf25f3 100644
--- a/gcc/config/i386/fxsrintrin.h
+++ b/gcc/config/i386/fxsrintrin.h
@@ -21,9 +21,9 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* #if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED */
-/* # error "Never use <fxsrintrin.h> directly; include <x86intrin.h> instead." */
-/* #endif */
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <fxsrintrin.h> directly; include <immintrin.h> instead."
+#endif
 
 #ifndef _FXSRINTRIN_H_INCLUDED
 #define _FXSRINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/immintrin.h b/gcc/config/i386/immintrin.h
index 6ce00012b42..10e1f27c605 100644
--- a/gcc/config/i386/immintrin.h
+++ b/gcc/config/i386/immintrin.h
@@ -38,6 +38,16 @@
 
 #include <wmmintrin.h>
 
+#include <fxsrintrin.h>
+
+#include <xsaveintrin.h>
+
+#include <xsaveoptintrin.h>
+
+#include <xsavesintrin.h>
+
+#include <xsavecintrin.h>
+
 #include <avxintrin.h>
 
 #include <avx2intrin.h>
@@ -120,6 +130,20 @@
 
 #include <cldemoteintrin.h>
 
+#include <rdseedintrin.h>
+
+#include <prfchwintrin.h>
+
+#include <adxintrin.h>
+
+#include <clwbintrin.h>
+
+#include <clflushoptintrin.h>
+
+#include <wbnoinvdintrin.h>
+
+#include <pkuintrin.h>
+
 extern __inline void
 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
 _wbinvd (void)
diff --git a/gcc/config/i386/pkuintrin.h b/gcc/config/i386/pkuintrin.h
index 727bec5dda8..be46522f0c0 100644
--- a/gcc/config/i386/pkuintrin.h
+++ b/gcc/config/i386/pkuintrin.h
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <pkuintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <pkuintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _PKUINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/prfchwintrin.h b/gcc/config/i386/prfchwintrin.h
index dab46395cd4..3ecf9088ee6 100644
--- a/gcc/config/i386/prfchwintrin.h
+++ b/gcc/config/i386/prfchwintrin.h
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED && !defined _MM3DNOW_H_INCLUDED
-# error "Never use <prfchwintrin.h> directly; include <x86intrin.h> or <mm3dnow.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED && !defined _MM3DNOW_H_INCLUDED
+# error "Never use <prfchwintrin.h> directly; include <immintrin.h> or <mm3dnow.h> instead."
 #endif
 
 #ifndef _PRFCHWINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/rdseedintrin.h b/gcc/config/i386/rdseedintrin.h
index 56c7ec85535..73c07637970 100644
--- a/gcc/config/i386/rdseedintrin.h
+++ b/gcc/config/i386/rdseedintrin.h
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <rdseedintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <rdseedintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _RDSEEDINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/wbnoinvdintrin.h b/gcc/config/i386/wbnoinvdintrin.h
index 9312a0082c9..5393698c6bb 100644
--- a/gcc/config/i386/wbnoinvdintrin.h
+++ b/gcc/config/i386/wbnoinvdintrin.h
@@ -1,5 +1,5 @@
-#ifndef _X86INTRIN_H_INCLUDED
-#error "Never use <wbnoinvdintrin.h> directly; include <x86intrin.h> instead."
+#ifndef _IMMINTRIN_H_INCLUDED
+#error "Never use <wbnoinvdintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _WBNOINVDINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/x86intrin.h b/gcc/config/i386/x86intrin.h
index 0eb8d88aeb8..6a08806ed7c 100644
--- a/gcc/config/i386/x86intrin.h
+++ b/gcc/config/i386/x86intrin.h
@@ -43,38 +43,10 @@
 
 #include <popcntintrin.h>
 
-#include <rdseedintrin.h>
-
-#include <prfchwintrin.h>
-
-#include <fxsrintrin.h>
-
-#include <xsaveintrin.h>
-
-#include <xsaveoptintrin.h>
-
-#endif /* __iamcu__ */
-
-#include <adxintrin.h>
-
-#ifndef __iamcu__
-
-#include <clwbintrin.h>
-
-#include <clflushoptintrin.h>
-
-#include <xsavesintrin.h>
-
-#include <xsavecintrin.h>
-
 #include <mwaitxintrin.h>
 
 #include <clzerointrin.h>
 
-#include <wbnoinvdintrin.h>
-
-#include <pkuintrin.h>
-
 #endif /* __iamcu__ */
 
 #endif /* _X86INTRIN_H_INCLUDED */
diff --git a/gcc/config/i386/xsavecintrin.h b/gcc/config/i386/xsavecintrin.h
index c61f2d69b2a..d7aa43534e5 100644
--- a/gcc/config/i386/xsavecintrin.h
+++ b/gcc/config/i386/xsavecintrin.h
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <xsavecintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <xsavecintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _XSAVECINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/xsaveintrin.h b/gcc/config/i386/xsaveintrin.h
index 3ab1c108c8c..77f9667b63b 100644
--- a/gcc/config/i386/xsaveintrin.h
+++ b/gcc/config/i386/xsaveintrin.h
@@ -21,9 +21,9 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* #if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED */
-/* # error "Never use <xsaveintrin.h> directly; include <x86intrin.h> instead." */
-/* #endif */
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <xsaveintrin.h> directly; include <immintrin.h> instead."
+#endif
 
 #ifndef _XSAVEINTRIN_H_INCLUDED
 #define _XSAVEINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/xsaveoptintrin.h b/gcc/config/i386/xsaveoptintrin.h
index ae62107b647..2a0bf0b334e 100644
--- a/gcc/config/i386/xsaveoptintrin.h
+++ b/gcc/config/i386/xsaveoptintrin.h
@@ -21,9 +21,9 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-/* #if !defined _X86INTRIN_H_INCLUDED && !defined _IMMINTRIN_H_INCLUDED */
-/* # error "Never use <xsaveoptintrin.h> directly; include <x86intrin.h> instead." */
-/* #endif */
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <xsaveoptintrin.h> directly; include <immintrin.h> instead."
+#endif
 
 #ifndef _XSAVEOPTINTRIN_H_INCLUDED
 #define _XSAVEOPTINTRIN_H_INCLUDED
diff --git a/gcc/config/i386/xsavesintrin.h b/gcc/config/i386/xsavesintrin.h
index 1abc0b331c5..9d9d035a111 100644
--- a/gcc/config/i386/xsavesintrin.h
+++ b/gcc/config/i386/xsavesintrin.h
@@ -21,8 +21,8 @@
    see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
-#if !defined _X86INTRIN_H_INCLUDED
-# error "Never use <xsavesintrin.h> directly; include <x86intrin.h> instead."
+#if !defined _IMMINTRIN_H_INCLUDED
+# error "Never use <xsavesintrin.h> directly; include <immintrin.h> instead."
 #endif
 
 #ifndef _XSAVESINTRIN_H_INCLUDED
