diff --git a/cranelift/filetests/isa/x86/allones_funcaddrs32.cton b/cranelift/filetests/isa/x86/allones_funcaddrs32.cton index c4c078470b..cf0036f4d0 100644 --- a/cranelift/filetests/isa/x86/allones_funcaddrs32.cton +++ b/cranelift/filetests/isa/x86/allones_funcaddrs32.cton @@ -1,6 +1,6 @@ ; binary emission of 32-bit code. test binemit -set is_compressed +set opt_level=best set allones_funcaddrs isa x86 haswell diff --git a/cranelift/filetests/isa/x86/allones_funcaddrs64.cton b/cranelift/filetests/isa/x86/allones_funcaddrs64.cton index ca3cf1ab69..3f47c78052 100644 --- a/cranelift/filetests/isa/x86/allones_funcaddrs64.cton +++ b/cranelift/filetests/isa/x86/allones_funcaddrs64.cton @@ -1,7 +1,7 @@ ; binary emission of 64-bit code. test binemit set is_64bit -set is_compressed +set opt_level=best set allones_funcaddrs isa x86 haswell diff --git a/cranelift/filetests/isa/x86/baseline_clz_ctz_popcount_encoding.cton b/cranelift/filetests/isa/x86/baseline_clz_ctz_popcount_encoding.cton index f69efd573a..72104272e1 100644 --- a/cranelift/filetests/isa/x86/baseline_clz_ctz_popcount_encoding.cton +++ b/cranelift/filetests/isa/x86/baseline_clz_ctz_popcount_encoding.cton @@ -1,7 +1,6 @@ - test binemit set is_64bit -set is_compressed +set opt_level=best isa x86 baseline ; The binary encodings can be verified with the command: diff --git a/cranelift/filetests/isa/x86/binary32.cton b/cranelift/filetests/isa/x86/binary32.cton index 842f941779..6eb4565f79 100644 --- a/cranelift/filetests/isa/x86/binary32.cton +++ b/cranelift/filetests/isa/x86/binary32.cton @@ -1,6 +1,6 @@ ; binary emission of x86-32 code. test binemit -set is_compressed +set opt_level=best isa x86 haswell ; The binary encodings can be verified with the command: diff --git a/cranelift/filetests/isa/x86/binary64-float.cton b/cranelift/filetests/isa/x86/binary64-float.cton index df910941cd..e9fcc99e63 100644 --- a/cranelift/filetests/isa/x86/binary64-float.cton +++ b/cranelift/filetests/isa/x86/binary64-float.cton @@ -1,7 +1,7 @@ ; Binary emission of 64-bit floating point code. test binemit set is_64bit -set is_compressed +set opt_level=best isa x86 haswell ; The binary encodings can be verified with the command: diff --git a/cranelift/filetests/isa/x86/binary64-pic.cton b/cranelift/filetests/isa/x86/binary64-pic.cton index cc592e0188..ff9cfc42ac 100644 --- a/cranelift/filetests/isa/x86/binary64-pic.cton +++ b/cranelift/filetests/isa/x86/binary64-pic.cton @@ -1,7 +1,7 @@ ; binary emission of 64-bit code. test binemit set is_64bit -set is_compressed +set opt_level=best set is_pic isa x86 haswell diff --git a/cranelift/filetests/isa/x86/binary64.cton b/cranelift/filetests/isa/x86/binary64.cton index 2a945ee17c..6417cd26e2 100644 --- a/cranelift/filetests/isa/x86/binary64.cton +++ b/cranelift/filetests/isa/x86/binary64.cton @@ -1,7 +1,7 @@ ; binary emission of x86-64 code. test binemit set is_64bit -set is_compressed +set opt_level=best isa x86 haswell ; The binary encodings can be verified with the command: diff --git a/cranelift/filetests/isa/x86/legalize-call.cton b/cranelift/filetests/isa/x86/legalize-call.cton index adcb6a6ad1..0eaaba0dfa 100644 --- a/cranelift/filetests/isa/x86/legalize-call.cton +++ b/cranelift/filetests/isa/x86/legalize-call.cton @@ -1,7 +1,7 @@ ; Test legalization of a non-colocated call in 64-bit non-PIC mode. test legalizer set is_64bit -set is_compressed +set opt_level=best isa x86 haswell function %call() { diff --git a/cranelift/filetests/isa/x86/prologue-epilogue.cton b/cranelift/filetests/isa/x86/prologue-epilogue.cton index 9ed37274ca..76aa459f94 100644 --- a/cranelift/filetests/isa/x86/prologue-epilogue.cton +++ b/cranelift/filetests/isa/x86/prologue-epilogue.cton @@ -1,6 +1,6 @@ test compile set is_64bit -set is_compressed +set opt_level=best set is_pic isa x86 haswell diff --git a/lib/filetests/src/test_binemit.rs b/lib/filetests/src/test_binemit.rs index 86058673e3..a0711414d4 100644 --- a/lib/filetests/src/test_binemit.rs +++ b/lib/filetests/src/test_binemit.rs @@ -9,6 +9,7 @@ use cretonne_codegen::dbg::DisplayList; use cretonne_codegen::ir; use cretonne_codegen::ir::entities::AnyEntity; use cretonne_codegen::print_errors::pretty_error; +use cretonne_codegen::settings::OptLevel; use cretonne_reader::TestCommand; use match_directive::match_directive; use std::borrow::Cow; @@ -121,7 +122,7 @@ impl SubTest for TestBinEmit { .min(); func.stack_slots.frame_size = min_offset.map(|off| (-off) as u32); - let is_compressed = isa.flags().is_compressed(); + let opt_level = isa.flags().opt_level(); // Give an encoding to any instruction that doesn't already have one. let mut divert = RegDiversions::new(); @@ -141,11 +142,11 @@ impl SubTest for TestBinEmit { recipe_constraints.satisfied(inst, &divert, &func) }); - if is_compressed { + if opt_level == OptLevel::Best { // Get the smallest legal encoding legal_encodings.min_by_key(|&e| encinfo.bytes(e)) } else { - // If not using compressed, just use the first encoding. + // If not optimizing, just use the first encoding. legal_encodings.next() } }