Changeset View
Changeset View
Standalone View
Standalone View
lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Show First 20 Lines • Show All 510 Lines • ▼ Show 20 Lines | getActionDefinitionsBuilder({G_EXTRACT, G_INSERT}) | ||||
const LLT &Ty0 = Query.Types[0]; | const LLT &Ty0 = Query.Types[0]; | ||||
const LLT &Ty1 = Query.Types[1]; | const LLT &Ty1 = Query.Types[1]; | ||||
return (Ty0.getSizeInBits() % 16 == 0) && | return (Ty0.getSizeInBits() % 16 == 0) && | ||||
(Ty1.getSizeInBits() % 16 == 0); | (Ty1.getSizeInBits() % 16 == 0); | ||||
}) | }) | ||||
.widenScalarIf( | .widenScalarIf( | ||||
[=](const LegalityQuery &Query) { | [=](const LegalityQuery &Query) { | ||||
const LLT Ty1 = Query.Types[1]; | const LLT Ty1 = Query.Types[1]; | ||||
return (Ty1.getScalarSizeInBits() < 16); | return Ty1.isVector() && Ty1.getScalarSizeInBits() < 16; | ||||
}, | }, | ||||
LegalizeMutations::widenScalarOrEltToNextPow2(1, 16)); | LegalizeMutations::widenScalarOrEltToNextPow2(1, 16)) | ||||
.clampScalar(0, S16, S256); | |||||
// TODO: vectors of pointers | // TODO: vectors of pointers | ||||
getActionDefinitionsBuilder(G_BUILD_VECTOR) | getActionDefinitionsBuilder(G_BUILD_VECTOR) | ||||
.legalForCartesianProduct(AllS32Vectors, {S32}) | .legalForCartesianProduct(AllS32Vectors, {S32}) | ||||
.legalForCartesianProduct(AllS64Vectors, {S64}) | .legalForCartesianProduct(AllS64Vectors, {S64}) | ||||
.clampNumElements(0, V16S32, V16S32) | .clampNumElements(0, V16S32, V16S32) | ||||
.clampNumElements(0, V2S64, V8S64) | .clampNumElements(0, V2S64, V8S64) | ||||
.minScalarSameAs(1, 0) | .minScalarSameAs(1, 0) | ||||
▲ Show 20 Lines • Show All 258 Lines • Show Last 20 Lines |