@@ -130,6 +130,10 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<128>] in {
130130 }
131131}
132132
133+ let Features = " sse" , Header = " xmmintrin.h" , Attributes = [NoThrow, Const] in {
134+ def _mm_prefetch : X86LibBuiltin<" void(void const *, int)" >;
135+ }
136+
133137// AVX
134138let Attributes = [Const, NoThrow, RequiredVectorWidth<256 >], Features = " avx" in {
135139 foreach Op = [" addsub" , " hadd" , " hsub" , " max" , " min" ] in {
@@ -138,6 +142,12 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in
138142 }
139143}
140144
145+ // PRFCHW
146+ let Features = " prfchw" , Header = " x86intrin.h" , Attributes = [NoThrow, Const] in {
147+ def _m_prefetch : X86LibBuiltin<" void(void *)" >;
148+ def _m_prefetchw : X86LibBuiltin<" void(void volatile const *)" >;
149+ }
150+
141151
142152// Mechanically ported builtins from the original `.def` file.
143153//
@@ -146,15 +156,6 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<256>], Features = "avx" in
146156// current formulation is based on what was easiest to recognize from the
147157// pre-TableGen version.
148158
149- let Features = " mmx" , Header = " immintrin.h" , Attributes = [NoThrow, Const] in {
150- def _mm_prefetch : X86LibBuiltin<" void(void const *, int)" >;
151- }
152-
153- let Features = " mmx" , Header = " intrin.h" , Attributes = [NoThrow, Const] in {
154- def _m_prefetch : X86LibBuiltin<" void(void *)" >;
155- def _m_prefetchw : X86LibBuiltin<" void(void volatile const *)" >;
156- }
157-
158159let Features = " sse" , Attributes = [NoThrow] in {
159160 def ldmxcsr : X86Builtin<" void(unsigned int)" >;
160161}
0 commit comments