]> granicus.if.org Git - llvm/commit
[TTI] Refine the cost of EXT in getUserCost()
authorHaicheng Wu <haicheng@codeaurora.org>
Sat, 15 Jul 2017 02:12:16 +0000 (02:12 +0000)
committerHaicheng Wu <haicheng@codeaurora.org>
Sat, 15 Jul 2017 02:12:16 +0000 (02:12 +0000)
commit8c939cb97f87bd5052cc814c0c7320b9cbc07131
treed8f176bf530f047608362f266bad3026a34d717c
parent2cf034ebb7c1ab37530afb3713b88b0f4f1e2f2b
[TTI] Refine the cost of EXT in getUserCost()

Now, getUserCost() only checks the src and dst types of EXT to decide it is free
or not. This change first checks the types, then calls isExtFreeImpl(), and
check if EXT can form ExtLoad at last. Currently, only AArch64 has customized
implementation of isExtFreeImpl() to check if EXT can be folded into its use.

Differential Revision: https://reviews.llvm.org/D34458

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308076 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
include/llvm/CodeGen/BasicTTIImpl.h
include/llvm/Target/TargetLowering.h
lib/Analysis/TargetTransformInfo.cpp
lib/CodeGen/CodeGenPrepare.cpp
test/Transforms/Inline/AArch64/ext.ll [new file with mode: 0644]
test/Transforms/Inline/PowerPC/ext.ll [new file with mode: 0644]
test/Transforms/Inline/PowerPC/lit.local.cfg [new file with mode: 0644]
test/Transforms/Inline/X86/ext.ll [new file with mode: 0644]