FileCheck inline_instruction_set
This commit is contained in:
parent
20e7caa737
commit
19c36a96df
1 changed files with 10 additions and 1 deletions
|
@ -1,4 +1,3 @@
|
||||||
// skip-filecheck
|
|
||||||
// Checks that only functions with the compatible instruction_set attributes are inlined.
|
// Checks that only functions with the compatible instruction_set attributes are inlined.
|
||||||
//
|
//
|
||||||
// A function is "compatible" when the *callee* has the same attribute or no attribute.
|
// A function is "compatible" when the *callee* has the same attribute or no attribute.
|
||||||
|
@ -47,16 +46,26 @@ fn inline_always_and_using_inline_asm() {
|
||||||
// EMIT_MIR inline_instruction_set.t32.Inline.diff
|
// EMIT_MIR inline_instruction_set.t32.Inline.diff
|
||||||
#[instruction_set(arm::t32)]
|
#[instruction_set(arm::t32)]
|
||||||
pub fn t32() {
|
pub fn t32() {
|
||||||
|
// CHECK-LABEL: fn t32(
|
||||||
|
// CHECK-NOT: (inlined instruction_set_a32)
|
||||||
instruction_set_a32();
|
instruction_set_a32();
|
||||||
|
// CHECK: (inlined instruction_set_t32)
|
||||||
instruction_set_t32();
|
instruction_set_t32();
|
||||||
|
// CHECK: (inlined instruction_set_default)
|
||||||
instruction_set_default();
|
instruction_set_default();
|
||||||
|
// CHECK-NOT: (inlined inline_always_and_using_inline_asm)
|
||||||
inline_always_and_using_inline_asm();
|
inline_always_and_using_inline_asm();
|
||||||
}
|
}
|
||||||
|
|
||||||
// EMIT_MIR inline_instruction_set.default.Inline.diff
|
// EMIT_MIR inline_instruction_set.default.Inline.diff
|
||||||
pub fn default() {
|
pub fn default() {
|
||||||
|
// CHECK-LABEL: fn default(
|
||||||
|
// CHECK-NOT: (inlined instruction_set_a32)
|
||||||
instruction_set_a32();
|
instruction_set_a32();
|
||||||
|
// CHECK-NOT: (inlined instruction_set_t32)
|
||||||
instruction_set_t32();
|
instruction_set_t32();
|
||||||
|
// CHECK: (inlined instruction_set_default)
|
||||||
instruction_set_default();
|
instruction_set_default();
|
||||||
|
// CHECK: (inlined inline_always_and_using_inline_asm)
|
||||||
inline_always_and_using_inline_asm();
|
inline_always_and_using_inline_asm();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue