Skip to content

Commit 1c372ca

Browse files
committed
Make the cold_path intrinsic mark the current block as cold
1 parent cb51cfe commit 1c372ca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/intrinsics/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,8 +1270,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
12701270
}
12711271

12721272
sym::cold_path => {
1273-
// This is a no-op. The intrinsic is just a hint to the optimizer.
1274-
// We still have an impl here to avoid it being turned into a call.
1273+
fx.bcx.set_cold_block(fx.bcx.current_block().unwrap());
12751274
}
12761275

12771276
// Unimplemented intrinsics must have a fallback body. The fallback body is obtained

0 commit comments

Comments
 (0)