| Issue |
184150
|
| Summary |
clang ABI lowering should not turn FP + int structs into integer arrays for AMDGPU
|
| Labels |
backend:AMDGPU,
clang:codegen
|
| Assignees |
|
| Reporter |
arsenm
|
Clang chooses to represent a struct containing a float and an int as an integer array: https://godbolt.org/z/sjafTqbq3
```
// clang -target amdgcn-amd-amdhsa -S -emit-llvm -o - -nogpulib -nogpuinc %s
typedef struct fp_int_pair {
float f;
int i;
} fp_int_pair;
fp_int_pair foo(fp_int_pair x) {
return x;
}
// Should emit { float, i32 }
//define hidden [2 x i32] @foo([2 x i32] returned %x.coerce) local_unnamed_addr #0 {
//entry:
// ret [2 x i32] %x.coerce
//}
```
There's no benefit to turning this into an integer array. If we had proper multiple return values, we would need this represented as the two types to attach nofpclass to the float component.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs