mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-28 01:23:14 +01: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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user