about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAntoni Boucher <bouanto@zoho.com>2024-09-27 12:12:24 -0400
committerAntoni Boucher <bouanto@zoho.com>2024-09-27 12:12:24 -0400
commit117cf3e3cd292c6c18454dcab3eec73ef090b323 (patch)
tree8b9016326c083d731cf90b11ab8ee241cbf8c7e5
parent11f4f160d3a10d2c4e6f49c173f0344f9b9f09ae (diff)
downloadrust-117cf3e3cd292c6c18454dcab3eec73ef090b323.tar.gz
rust-117cf3e3cd292c6c18454dcab3eec73ef090b323.zip
Fix for libgccjit 12
-rw-r--r--src/context.rs1
-rw-r--r--src/intrinsic/llvm.rs2
2 files changed, 3 insertions, 0 deletions
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 rustc_target::spec::{HasTargetSpec, HasWasmCAbiOpt, Target, TlsModel, WasmCA
 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 rustc_codegen_ssa::traits::BuilderMethods;
 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") {