================
@@ -127,13 +145,61 @@ ArgInfo AArch64TargetInfo::classifyArgumentType(
}
reportNYI("Aggregate argument type handling");
- return ArgInfo::getDirect();
+ return ArgInfo::getIgnore();
}
bool AArch64TargetInfo::passAsAggregateType(const Type *Ty) const {
// TODO: Handle SVE types. For now, they don't get through the type mapper.
return isAggregateTypeForABI(Ty);
}
+bool AArch64TargetInfo::isHomogeneousAggregateBaseType(const Type *Ty) const {
+ // Soft-float ABI: no types are homogeneous aggregates.
+ if (isSoftFloat())
+ return false;
+
+ // Homogeneous aggregates for AAPCS64 must have base types of a floating
----------------
madhur13490 wrote:
In QualTypeMapper.cpp Ln 100–101:
```
case Type::Atomic:
return convertType(cast<AtomicType>(QT)->getValueType());
```
The mapper strips _Atomic, so `struct { _Atomic(float) a, b; }` reaches
`isHomogeneousAggregateBaseType` as two plain floats and is classified as a
2-member HFA. Classic CodeGen rejects `_Atomic(float)` as an HFA base
(`AtomicType` isn't a `BuiltinType`) and returns the struct as `i64.` The
atomic-ness needs to be preserved (or the record rejected) so the classifier
can distinguish it.
https://github.com/llvm/llvm-project/pull/218799
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits