getCastInstrCost()

Jonas Paulsson via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 17 02:36:36 PDT 2017


Hi,


On 2017-03-09 22:55, Hal Finkel wrote:
>
> On 02/01/2017 09:19 AM, Jonas Paulsson via llvm-commits wrote:
>> Hi,
>>
>> It seems odd to think that a vector truncate could be a noop in 
>> getCastInstrCost().
>>
>> Add a check so that this only applies to scalar types.
>
> Agreed (please commit with a test case).
>
>  -Hal

I applied this to the regressions test, and found that 
test/Analysis/CostModel/X86/trunc.ll now fails. It seems that the vector 
truncates in that test get higher costs with this patch. Could someone 
acquainted with that file perhaps take a look? Simon?

/Jonas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: getCastInstrCost_fix.patch
Type: text/x-patch
Size: 724 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170317/475a9578/attachment.bin>


More information about the llvm-commits mailing list