From 117cf3e3cd292c6c18454dcab3eec73ef090b323 Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Fri, 27 Sep 2024 12:12:24 -0400 Subject: [PATCH] Fix for libgccjit 12 --- src/context.rs | 1 + src/intrinsic/llvm.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/context.rs b/src/context.rs index d4ac4f26b03..9756f0faae2 100644 --- a/src/context.rs +++ b/src/context.rs @@ -25,6 +25,7 @@ use crate::callee::get_fn; use crate::common::SignType; +#[cfg_attr(not(feature = "master"), allow(dead_code))] pub struct CodegenCx<'gcc, 'tcx> { pub codegen_unit: &'tcx CodegenUnit<'tcx>, pub context: &'gcc Context<'gcc>, diff --git a/src/intrinsic/llvm.rs b/src/intrinsic/llvm.rs index b1fed82507d..7a8fe134cfc 100644 --- a/src/intrinsic/llvm.rs +++ b/src/intrinsic/llvm.rs @@ -7,6 +7,7 @@ use crate::builder::Builder; use crate::context::CodegenCx; +#[cfg_attr(not(feature = "master"), allow(unused_variables))] pub fn adjust_function<'gcc>( context: &'gcc Context<'gcc>, func_name: &str, @@ -16,6 +17,7 @@ pub fn adjust_function<'gcc>( // FIXME: we should not need this hack: this is required because both _mm_fcmadd_sch // and _mm_mask3_fcmadd_round_sch calls llvm.x86.avx512fp16.mask.vfcmadd.csh and we // seem to need to map this one LLVM intrinsic to 2 different GCC builtins. + #[cfg(feature = "master")] match func_name { "__builtin_ia32_vfcmaddcsh_mask3_round" => { if format!("{:?}", args[3]).ends_with("255") {