Skip to content

Commit 931b069

Browse files
committed
Handle is_val_statically_known in Cranelift
The intrinsic always returns false though.
1 parent cdc2f08 commit 931b069

File tree

1 file changed

+7
-0
lines changed
  • compiler/rustc_codegen_cranelift/src/intrinsics

1 file changed

+7
-0
lines changed

Diff for: compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs

+7
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,13 @@ fn codegen_regular_intrinsic_call<'tcx>(
439439

440440
ret.write_cvalue(fx, a);
441441
}
442+
sym::is_val_statically_known => {
443+
intrinsic_args!(fx, args => (_a); intrinsic);
444+
445+
// Unimplemented intrinsic defaults to false
446+
let res = fx.bcx.ins().iconst(cranelift_codegen::ir::types::I8, false as i64);
447+
ret.write_cvalue(fx, CValue::by_val(res, fx.tcx.types.bool));
448+
}
442449
sym::breakpoint => {
443450
intrinsic_args!(fx, args => (); intrinsic);
444451

0 commit comments

Comments
 (0)