diff --git a/compiler/rustc_target/src/callconv/x86.rs b/compiler/rustc_target/src/callconv/x86.rs index 918b71c80c4f0..a2bfbe11f006a 100644 --- a/compiler/rustc_target/src/callconv/x86.rs +++ b/compiler/rustc_target/src/callconv/x86.rs @@ -183,7 +183,9 @@ pub(crate) fn fill_inregs<'a, Ty, C>( free_regs -= size_in_regs; - if arg.layout.size.bits() <= 32 && unit.kind == RegKind::Integer { + if opts.flavor != Flavor::FastcallOrVectorcall + || arg.layout.size.bits() <= 32 && unit.kind == RegKind::Integer + { attrs.set(ArgAttribute::InReg); }