Pass the target isa when printing a function as a string.
This allows encodings and register names to be printed correctly.
This commit is contained in:
@@ -41,7 +41,7 @@ impl SubTest for TestDCE {
|
|||||||
.dce(context.flags_or_isa())
|
.dce(context.flags_or_isa())
|
||||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
||||||
|
|
||||||
let text = comp_ctx.func.to_string();
|
let text = comp_ctx.func.display(context.isa).to_string();
|
||||||
run_filecheck(&text, context)
|
run_filecheck(&text, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ impl SubTest for TestLICM {
|
|||||||
.licm(context.flags_or_isa())
|
.licm(context.flags_or_isa())
|
||||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
||||||
|
|
||||||
let text = comp_ctx.func.to_string();
|
let text = comp_ctx.func.display(context.isa).to_string();
|
||||||
run_filecheck(&text, context)
|
run_filecheck(&text, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ impl SubTest for TestPostopt {
|
|||||||
.postopt(isa)
|
.postopt(isa)
|
||||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
||||||
|
|
||||||
let text = comp_ctx.func.to_string();
|
let text = comp_ctx.func.display(isa).to_string();
|
||||||
run_filecheck(&text, context)
|
run_filecheck(&text, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ impl SubTest for TestPreopt {
|
|||||||
.preopt(isa)
|
.preopt(isa)
|
||||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
||||||
|
|
||||||
let text = &comp_ctx.func.to_string();
|
let text = &comp_ctx.func.display(isa).to_string();
|
||||||
run_filecheck(&text, context)
|
run_filecheck(&text, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ impl SubTest for TestShrink {
|
|||||||
.shrink_instructions(isa)
|
.shrink_instructions(isa)
|
||||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
||||||
|
|
||||||
let text = comp_ctx.func.to_string();
|
let text = comp_ctx.func.display(isa).to_string();
|
||||||
run_filecheck(&text, context)
|
run_filecheck(&text, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ impl SubTest for TestSimpleGVN {
|
|||||||
.simple_gvn(context.flags_or_isa())
|
.simple_gvn(context.flags_or_isa())
|
||||||
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
.map_err(|e| pretty_error(&comp_ctx.func, context.isa, Into::into(e)))?;
|
||||||
|
|
||||||
let text = comp_ctx.func.to_string();
|
let text = comp_ctx.func.display(context.isa).to_string();
|
||||||
run_filecheck(&text, context)
|
run_filecheck(&text, context)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user