OSDN Git Service

[TTI] Fix getGEPCost() for geps with a single operand.
authorDavide Italiano <davide@freebsd.org>
Fri, 1 Sep 2017 19:54:08 +0000 (19:54 +0000)
committerDavide Italiano <davide@freebsd.org>
Fri, 1 Sep 2017 19:54:08 +0000 (19:54 +0000)
commite5593530f5824059a36ed87989a7ab64b63e5e60
tree9ebf79fb31b8fff4470b062a60ebd59ecf0d1635
parentf2de8c1c55180a4726931681898382664eaf3715
[TTI] Fix getGEPCost() for geps with a single operand.

Previously this would sporadically crash as TargetType
was never initialized. We special-case the single-operand
case returning earlier and trying to mimic the behaviour of
isLegalAddressingMode as closely as possible.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312357 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/TargetTransformInfoImpl.h
test/Transforms/SimplifyCFG/gepcost.ll [new file with mode: 0644]