Disable SIMD features by default

This commit is contained in:
Andrew Brown
2019-07-11 10:17:14 -07:00
committed by Dan Gohman
parent 8378297f33
commit f2c48009e8
5 changed files with 8 additions and 4 deletions

View File

@@ -84,7 +84,7 @@ pub fn define() -> SettingGroup {
false,
);
settings.add_bool("enable_simd", "Enable the use of SIMD instructions.", true);
settings.add_bool("enable_simd", "Enable the use of SIMD instructions.", false);
settings.add_bool(
"enable_atomics",

View File

@@ -35,7 +35,9 @@ mod tests {
#[test]
fn predicates() {
let shared = settings::Flags::new(settings::builder());
let mut sb = settings::builder();
sb.set("enable_simd", "true").unwrap();
let shared = settings::Flags::new(sb);
let mut b = builder();
b.enable("supports_f").unwrap();
b.enable("supports_d").unwrap();

View File

@@ -387,7 +387,7 @@ mod tests {
avoid_div_traps = false\n\
enable_float = true\n\
enable_nan_canonicalization = false\n\
enable_simd = true\n\
enable_simd = false\n\
enable_atomics = true\n\
allones_funcaddrs = false\n\
probestack_enabled = true\n\
@@ -395,7 +395,7 @@ mod tests {
jump_tables_enabled = true\n"
);
assert_eq!(f.opt_level(), super::OptLevel::Default);
assert_eq!(f.enable_simd(), true);
assert_eq!(f.enable_simd(), false);
assert_eq!(f.baldrdash_prologue_words(), 0);
}

View File

@@ -1,5 +1,6 @@
; Binary emission of 32-bit floating point code.
test binemit
set enable_simd
target i686 haswell
; The binary encodings can be verified with the command:

View File

@@ -1,6 +1,7 @@
; Binary emission of 64-bit floating point code.
test binemit
set opt_level=best
set enable_simd
target x86_64 haswell
; The binary encodings can be verified with the command: