[NFC][IndVarSimplify] remove duplicate code in widenWithVariantLoadUseCodegen.
authorZhongduo Lin <jimmy.zhongduo.lin@huawei.com>
Wed, 15 Jan 2020 21:22:47 +0000 (16:22 -0500)
committerDanilo Carvalho Grael <danilo.carvalho.grael@huawei.com>
Wed, 15 Jan 2020 21:27:58 +0000 (16:27 -0500)
commit34ba96a3d49e14abb2a36114a4ed6f97e1b9a9ee
treed8340916903b577558691557dbd8beb1ecc8ec67
parentb72a8c65e4e34779b6bc9e466203f553f5294486
[NFC][IndVarSimplify] remove duplicate code in widenWithVariantLoadUseCodegen.

Summary: Duplicate code in widenWithVariantLoadUseCodegen is removed and also use assert to check unknown extension type as it should be filtered out by the pre condition check before calling this function.

Reviewers: az, sanjoy, sebpop, efriedma, javed.absar, sanjoy.google

Reviewed By: efriedma

Subscribers: hiraditya, llvm-commits, amehsan

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72652
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp