https://bugs.llvm.org/show_bug.cgi?id=48248
Bug ID: 48248
Summary: Crash on win64 vectorcall with large
Product: clang
Version: trunk
Hardware: PC
OS: Windows XP
Status: NEW
Severity: normal
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangb...@nondot.org
Reporter: christoffer.le...@gmail.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
I found a possible bug in TargetInfo.cpp, WinX86_64ABIInfo::classify
On rows 4215-4216 we have the following:
} else if (IsReturnType) {
return ABIArgInfo::getExpand();
This would suggest that we use "Expand" as strategy for a return value on a
vector call. However, "Expand" is not a valid strategy for return values, as it
is only for parameters. Hoping to expose this bug, I created large vectors
embedded in structs, which would then hit the "homogenous aggregate" path in
said function.
I finally struck gold with the following:
typedef double foo __attribute__ ((vector_size (64)));
struct Test {
foo a[2];
};
struct Test __vectorcall bar(struct Test a) {
return (struct Test) {};
}
However I am not sure that I'm actually triggering the bug, or if there are
multiple bugs, as this only crashes when "struct Test a" is there, which makes
me suspect that maybe we're hitting some other bug here.
Godbolt link: https://www.godbolt.org/z/EWWaor
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs