mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 22:50:53 +03:00
Added a check for vector size to gen_gccbuiltins.cpp.
Previously, gen_gccbuiltins was emitting intrinsics that used vector types larger than 256 bits and those are not defined in core.simd.
This commit is contained in:
parent
7436d94e09
commit
77c0192c06
1 changed files with 12 additions and 0 deletions
|
@ -55,6 +55,18 @@ string dtype(Record* rec)
|
|||
type = type.substr(i);
|
||||
}
|
||||
|
||||
if(vec.size() > 0 && type.size() > 0)
|
||||
{
|
||||
int typeSize, vecElements;
|
||||
if(
|
||||
sscanf(vec.c_str(), "%d", &vecElements) == 1 &&
|
||||
sscanf(type.c_str() + 1, "%d", &typeSize) == 1 &&
|
||||
typeSize * vecElements > 256)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
if(type == "i8")
|
||||
return "byte" + vec;
|
||||
else if(type == "i16")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue