Skip to content

Commit

Permalink
Handle is_val_statically_known in Cranelift
Browse files Browse the repository at this point in the history
The intrinsic always returns false though.
  • Loading branch information
NCGThompson committed Jan 15, 2024
1 parent cdc2f08 commit 931b069
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,13 @@ fn codegen_regular_intrinsic_call<'tcx>(

ret.write_cvalue(fx, a);
}
sym::is_val_statically_known => {
intrinsic_args!(fx, args => (_a); intrinsic);

// Unimplemented intrinsic defaults to false
let res = fx.bcx.ins().iconst(cranelift_codegen::ir::types::I8, false as i64);
ret.write_cvalue(fx, CValue::by_val(res, fx.tcx.types.bool));
}
sym::breakpoint => {
intrinsic_args!(fx, args => (); intrinsic);

Expand Down

0 comments on commit 931b069

Please sign in to comment.