Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8618ab8

Browse files
committedAug 6, 2024·
tweak the comment
1 parent 664fec0 commit 8618ab8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎compiler/rustc_codegen_ssa/src/mir/operand.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,11 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
637637

638638
mir::Operand::Constant(ref constant) => {
639639
let constant_ty = self.monomorphize(constant.ty());
640-
// Make sure this type is actually passed as an immediate vector.
641-
// (In particular, this excludes packed SIMD vectors.)
640+
// Most SIMD vector constants should be passed as immediates.
641+
// (In particular, some intrinsics really rely on this.)
642642
if constant_ty.is_simd() {
643+
// However, some SIMD types do not actually use the vector ABI
644+
// (in particular, packed SIMD types do not). Ensure we exclude those.
643645
let layout = bx.layout_of(constant_ty);
644646
if let Abi::Vector { .. } = layout.abi {
645647
let (llval, ty) = self.immediate_const_vector(bx, constant);

0 commit comments

Comments
 (0)
Please sign in to comment.