Skip to content

Commit

Permalink
Fix build (invalid simd renaming)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Mar 2, 2024
1 parent 1b504c0 commit 7151f60
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_gcc/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2103,7 +2103,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
self.vector_reduce(src, |a, b, context| context.new_binary_op(loc, op, a.get_type(), a, b))
}

pub fn vector_reduce_fadd_fast(
pub fn vector_reduce_fadd_reassoc(
&mut self,
_acc: RValue<'gcc>,
_src: RValue<'gcc>,
Expand Down Expand Up @@ -2134,7 +2134,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
unimplemented!();
}

pub fn vector_reduce_fmul_fast(
pub fn vector_reduce_fmul_reassoc(
&mut self,
_acc: RValue<'gcc>,
_src: RValue<'gcc>,
Expand Down
9 changes: 4 additions & 5 deletions compiler/rustc_codegen_gcc/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use rustc_errors::{
DiagCtxt, DiagnosticArgValue, DiagnosticBuilder, EmissionGuarantee, IntoDiagnostic,
IntoDiagnosticArg, Level,
Diag, DiagCtxt, DiagArgValue, EmissionGuarantee, IntoDiagnostic, IntoDiagnosticArg, Level,
};
use rustc_macros::{Diagnostic, Subdiagnostic};
use rustc_span::Span;
Expand Down Expand Up @@ -35,7 +34,7 @@ pub(crate) enum PossibleFeature<'a> {
struct ExitCode(Option<i32>);

impl IntoDiagnosticArg for ExitCode {
fn into_diagnostic_arg(self) -> DiagnosticArgValue {
fn into_diagnostic_arg(self) -> DiagArgValue {
let ExitCode(exit_code) = self;
match exit_code {
Some(t) => t.into_diagnostic_arg(),
Expand Down Expand Up @@ -112,8 +111,8 @@ pub(crate) struct TargetFeatureDisableOrEnable<'a> {
pub(crate) struct MissingFeatures;

impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for TargetFeatureDisableOrEnable<'_> {
fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> DiagnosticBuilder<'_, G> {
let mut diag = DiagnosticBuilder::new(
fn into_diagnostic(self, dcx: &'_ DiagCtxt, level: Level) -> Diag<'_, G> {
let mut diag = Diag::new(
dcx,
level,
fluent::codegen_gcc_target_feature_disable_or_enable,
Expand Down
17 changes: 8 additions & 9 deletions compiler/rustc_codegen_gcc/src/type_of.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ use rustc_middle::ty::print::with_no_trimmed_paths;
use rustc_middle::ty::{self, Ty, TypeVisitableExt};
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
use rustc_target::abi::{
self, Abi, Align, FieldsShape, Int, Integer, PointeeInfo, Pointer, Size, TyAbiInterface,
Variants, F32, F64,
self, Abi, Align, FieldsShape, Integer, Primitive, PointeeInfo, Size, TyAbiInterface, Variants,
};

use crate::abi::{FnAbiGcc, FnAbiGccExt, GccType};
Expand Down Expand Up @@ -282,13 +281,13 @@ impl<'tcx> LayoutGccExt<'tcx> for TyAndLayout<'tcx> {
offset: Size,
) -> Type<'gcc> {
match scalar.primitive() {
Int(i, true) => cx.type_from_integer(i),
Int(i, false) => cx.type_from_unsigned_integer(i),
F16 => cx.type_f16(),
F32 => cx.type_f32(),
F64 => cx.type_f64(),
F128 => cx.type_f128(),
Pointer(address_space) => {
Primitive::Int(i, true) => cx.type_from_integer(i),
Primitive::Int(i, false) => cx.type_from_unsigned_integer(i),
Primitive::F16 => cx.type_f16(),
Primitive::F32 => cx.type_f32(),
Primitive::F64 => cx.type_f64(),
Primitive::F128 => cx.type_f128(),
Primitive::Pointer(address_space) => {
// If we know the alignment, pick something better than i8.
let pointee = if let Some(pointee) = self.pointee_info_at(cx, offset) {
cx.type_pointee_for_align(pointee.align)
Expand Down

0 comments on commit 7151f60

Please sign in to comment.