Skip to content

Commit ced05ab

Browse files
committed
add carryless_mul to replaced_intrinsics
1 parent 4b7a82d commit ced05ab

File tree

1 file changed

+8
-1
lines changed
  • compiler/rustc_codegen_llvm/src

1 file changed

+8
-1
lines changed

compiler/rustc_codegen_llvm/src/lib.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,14 @@ impl CodegenBackend for LlvmCodegenBackend {
345345
}
346346

347347
fn replaced_intrinsics(&self) -> Vec<Symbol> {
348-
vec![sym::unchecked_funnel_shl, sym::unchecked_funnel_shr, sym::carrying_mul_add]
348+
let mut will_not_use_fallback =
349+
vec![sym::unchecked_funnel_shl, sym::unchecked_funnel_shr, sym::carrying_mul_add];
350+
351+
if llvm_util::get_version() >= (22, 0, 0) {
352+
will_not_use_fallback.push(sym::carryless_mul);
353+
}
354+
355+
will_not_use_fallback
349356
}
350357

351358
fn codegen_crate<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Box<dyn Any> {

0 commit comments

Comments
 (0)