Support vector casts in more places, fixing a variety of assertion
authorDan Gohman <gohman@apple.com>
Mon, 15 Jun 2009 22:12:54 +0000 (22:12 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 15 Jun 2009 22:12:54 +0000 (22:12 +0000)
commit6de29f8d960505421d61c80cdb738e16720b6c0e
treee4e4bc5a3d8d9bca1c5f1cb6221d92707a655f21
parent0d492bdf4d07db79e240c3c21c5321416f1463d1
Support vector casts in more places, fixing a variety of assertion
failures.

To support this, add some utility functions to Type to help support
vector/scalar-independent code. Change ConstantInt::get and
ConstantFP::get to support vector types, and add an overload to
ConstantInt::get that uses a static IntegerType type, for
convenience.

Introduce a new getConstant method for ScalarEvolution, to simplify
common use cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73431 91177308-0d34-0410-b5e6-96231b3b80d8
18 files changed:
include/llvm/Analysis/ScalarEvolution.h
include/llvm/Constants.h
include/llvm/Type.h
lib/Analysis/ConstantFolding.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Analysis/ScalarEvolutionExpander.cpp
lib/Analysis/ValueTracking.cpp
lib/Transforms/Instrumentation/RSProfiling.cpp
lib/Transforms/Scalar/InstructionCombining.cpp
lib/Transforms/Scalar/LoopIndexSplit.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
lib/VMCore/ConstantFold.cpp
lib/VMCore/Constants.cpp
lib/VMCore/Instructions.cpp
lib/VMCore/Type.cpp
lib/VMCore/Verifier.cpp
test/Feature/vector-cast-constant-exprs.ll [new file with mode: 0644]
test/Transforms/InstCombine/vector-casts.ll [new file with mode: 0644]