aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-06-13 04:38:55 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-06-13 04:38:55 +0000
commit6f8abf929ac173872cc50aff767bc25f2a07a523 (patch)
treef35698453357113bc44221d555040b5d16848f18 /include
parent52ed363fd31e9f3952c36b760830dbcbebe9d753 (diff)
downloadexternal_llvm-6f8abf929ac173872cc50aff767bc25f2a07a523.zip
external_llvm-6f8abf929ac173872cc50aff767bc25f2a07a523.tar.gz
external_llvm-6f8abf929ac173872cc50aff767bc25f2a07a523.tar.bz2
Crash less. The i64 restriction in BinomialCoefficient caused some problems
with code that was expecting different bit widths for different values. Make getTruncateOrZeroExtend a method on ScalarEvolution, and use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Analysis/ScalarEvolution.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h
index a8e45e0..8474b72 100644
--- a/include/llvm/Analysis/ScalarEvolution.h
+++ b/include/llvm/Analysis/ScalarEvolution.h
@@ -253,6 +253,11 @@ namespace llvm {
SCEVHandle getMinusSCEV(const SCEVHandle &LHS,
const SCEVHandle &RHS);
+ /// getTruncateOrZeroExtend - Return a SCEV corresponding to a conversion
+ /// of the input value to the specified type. If the type must be
+ /// extended, it is zero extended.
+ SCEVHandle getTruncateOrZeroExtend(const SCEVHandle &V, const Type *Ty);
+
/// getIntegerSCEV - Given an integer or FP type, create a constant for the
/// specified signed integer value and return a SCEV for the constant.
SCEVHandle getIntegerSCEV(int Val, const Type *Ty);