Skip to content

Commit

Permalink
Cranelift handle is_val_statically_known
Browse files Browse the repository at this point in the history
  • Loading branch information
NCGThompson committed Jan 16, 2024
1 parent cdc2f08 commit ba5dcc7
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);

// FIXME impliment intrinsic or guarantee propogation of false
let res = fx.bcx.ins().iconst(cranelift_codegen::ir::types::I8, false as i64);
ret.write_cvalue(fx, CValue::by_val(res, ret.layout()));
}
sym::breakpoint => {
intrinsic_args!(fx, args => (); intrinsic);

Expand Down

0 comments on commit ba5dcc7

Please sign in to comment.