We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
PassMode::Direct
1 parent bcd0683 commit 916b1daCopy full SHA for 916b1da
compiler/rustc_target/src/callconv/s390x.rs
@@ -38,9 +38,17 @@ where
38
}
39
40
let size = arg.layout.size;
41
- if size.bits() <= 128 && arg.layout.is_single_vector_element(cx, size) {
42
- arg.cast_to(Reg { kind: RegKind::Vector, size });
43
- return;
+ if size.bits() <= 128 {
+ if let BackendRepr::Vector { .. } = arg.layout.backend_repr {
+ // pass non-wrapped vector types using `PassMode::Direct`
44
+ return;
45
+ }
46
+
47
+ if arg.layout.is_single_vector_element(cx, size) {
48
+ // pass non-transparant wrappers around a vector as `PassMode::Cast`
49
+ arg.cast_to(Reg { kind: RegKind::Vector, size });
50
51
52
53
if !arg.layout.is_aggregate() && size.bits() <= 64 {
54
arg.extend_integer_width_to(64);
0 commit comments