[llvm-dev] X86 TRUNCATE cost for AVX & AVX2 mode
Nema, Ashutosh via llvm-dev
llvm-dev at lists.llvm.org
Mon Apr 11 06:51:18 PDT 2016
I was going through the X86TTIImpl::getCastInstrCost, and got a doubt on cost
calculation for TRUNCATE instruction in AVX mode.
In AVX2ConversionTbl & AVXConversionTbl table there is no cost defined for
TRUNCATE v16i32 to v16i8, as a fallback it goes to SSE41ConversionTbl table and there
it finds cost as 30 for this operation. 30 cost for this operation looks very high.
Wondering why such a high cost kept for this, any pointers to understand this will be helpful.
In few cases this restricts better vectorization opportunities.
Cost for TRUNCATE v16i32 to v16i8 in SSE2ConversionTbl as 7.
Cost for TRUNCATE v8i32 to v8i8 is 2 in AVX2 and 4 in AVX mode.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev