@@ -227,15 +227,6 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
227
227
} ;
228
228
let ( major, _, _) = get_version ( ) ;
229
229
match ( arch, s) {
230
- ( "x86" , "sse4.2" ) => Some ( LLVMFeature :: with_dependencies (
231
- "sse4.2" ,
232
- smallvec ! [ TargetFeatureFoldStrength :: EnableOnly ( "crc32" ) ] ,
233
- ) ) ,
234
- ( "x86" , "pclmulqdq" ) => Some ( LLVMFeature :: new ( "pclmul" ) ) ,
235
- ( "x86" , "rdrand" ) => Some ( LLVMFeature :: new ( "rdrnd" ) ) ,
236
- ( "x86" , "bmi1" ) => Some ( LLVMFeature :: new ( "bmi" ) ) ,
237
- ( "x86" , "cmpxchg16b" ) => Some ( LLVMFeature :: new ( "cx16" ) ) ,
238
- ( "x86" , "lahfsahf" ) => Some ( LLVMFeature :: new ( "sahf" ) ) ,
239
230
( "aarch64" , "rcpc2" ) => Some ( LLVMFeature :: new ( "rcpc-immo" ) ) ,
240
231
( "aarch64" , "dpb" ) => Some ( LLVMFeature :: new ( "ccpp" ) ) ,
241
232
( "aarch64" , "dpb2" ) => Some ( LLVMFeature :: new ( "ccdp" ) ) ,
@@ -259,13 +250,22 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
259
250
( "arm" , "fp16" ) => Some ( LLVMFeature :: new ( "fullfp16" ) ) ,
260
251
// Filter out features that are not supported by the current LLVM version
261
252
( "loongarch32" | "loongarch64" , "32s" ) if major < 21 => None ,
253
+ ( "powerpc" , "power8-crypto" ) => Some ( LLVMFeature :: new ( "crypto" ) ) ,
254
+ ( "sparc" , "leoncasa" ) => Some ( LLVMFeature :: new ( "hasleoncasa" ) ) ,
255
+ ( "x86" , "sse4.2" ) => Some ( LLVMFeature :: with_dependencies (
256
+ "sse4.2" ,
257
+ smallvec ! [ TargetFeatureFoldStrength :: EnableOnly ( "crc32" ) ] ,
258
+ ) ) ,
259
+ ( "x86" , "pclmulqdq" ) => Some ( LLVMFeature :: new ( "pclmul" ) ) ,
260
+ ( "x86" , "rdrand" ) => Some ( LLVMFeature :: new ( "rdrnd" ) ) ,
261
+ ( "x86" , "bmi1" ) => Some ( LLVMFeature :: new ( "bmi" ) ) ,
262
+ ( "x86" , "cmpxchg16b" ) => Some ( LLVMFeature :: new ( "cx16" ) ) ,
263
+ ( "x86" , "lahfsahf" ) => Some ( LLVMFeature :: new ( "sahf" ) ) ,
262
264
// Enable the evex512 target feature if an avx512 target feature is enabled.
263
265
( "x86" , s) if s. starts_with ( "avx512" ) => Some ( LLVMFeature :: with_dependencies (
264
266
s,
265
267
smallvec ! [ TargetFeatureFoldStrength :: EnableOnly ( "evex512" ) ] ,
266
268
) ) ,
267
- ( "sparc" , "leoncasa" ) => Some ( LLVMFeature :: new ( "hasleoncasa" ) ) ,
268
- ( "powerpc" , "power8-crypto" ) => Some ( LLVMFeature :: new ( "crypto" ) ) ,
269
269
( "x86" , "avx10.1" ) => Some ( LLVMFeature :: new ( "avx10.1-512" ) ) ,
270
270
( "x86" , "avx10.2" ) => Some ( LLVMFeature :: new ( "avx10.2-512" ) ) ,
271
271
( "x86" , "apxf" ) => Some ( LLVMFeature :: with_dependencies (
0 commit comments