File tree Expand file tree Collapse file tree 2 files changed +18
-3
lines changed
Expand file tree Collapse file tree 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -11618,9 +11618,8 @@ ABIArgInfo XtensaABIInfo::classifyArgumentType(QualType Ty,
1161811618 if (Size < 32 && Ty->isIntegralOrEnumerationType () && !MustUseStack) {
1161911619 return extendType (Ty);
1162011620 }
11621- if (Size == 64 )
11622- return ABIArgInfo::getDirect (llvm::IntegerType::get (getVMContext (), 64 ));
11623- return ABIArgInfo::getDirect (llvm::IntegerType::get (getVMContext (), 32 ));
11621+ // Assume that type has 32, 64 or 128 bits
11622+ return ABIArgInfo::getDirect (llvm::IntegerType::get (getVMContext (), Size));
1162411623 }
1162511624
1162611625 // Aggregates which are <= 6*32 will be passed in registers if possible,
@@ -11631,6 +11630,8 @@ ABIArgInfo XtensaABIInfo::classifyArgumentType(QualType Ty,
1163111630 } else if (NeededAlign == (2 * 32 )) {
1163211631 return ABIArgInfo::getDirect (llvm::ArrayType::get (
1163311632 llvm::IntegerType::get (getVMContext (), 64 ), NeededArgGPRs / 2 ));
11633+ } else if (NeededAlign == (4 * 32 )) {
11634+ return ABIArgInfo::getDirect (llvm::IntegerType::get (getVMContext (), 128 ));
1163411635 } else {
1163511636 return ABIArgInfo::getDirect (llvm::ArrayType::get (
1163611637 llvm::IntegerType::get (getVMContext (), 32 ), NeededArgGPRs));
Original file line number Diff line number Diff line change @@ -12,3 +12,17 @@ char *bufalloc ()
1212}
1313
1414// CHECK: define dso_local noalias i8* @bufalloc() #0 {
15+
16+ struct S16 { int a [4 ]; } __attribute__ ((aligned (16 )));
17+
18+ void callee_struct_a16b_1 (struct S16 a ) {}
19+
20+ // CHECK: define dso_local void @callee_struct_a16b_1(i128 %a.coerce)
21+
22+ void callee_struct_a16b_2 (struct S16 a , int b ) {}
23+
24+ // CHECK: define dso_local void @callee_struct_a16b_2(i128 %a.coerce, i32 noundef %b)
25+
26+ void callee_struct_a16b_3 (int a , struct S16 b ) {}
27+
28+ // CHECK: define dso_local void @callee_struct_a16b_3(i32 noundef %a, %struct.S16* noundef byval(%struct.S16) align 16 %b)
You can’t perform that action at this time.
0 commit comments