diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-01-12 22:49:11 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-01-12 22:49:11 +0000 | 
| commit | 3b6058c278071172633a4b7295173160326c78d3 (patch) | |
| tree | 8dcb76b2438bdfc8f7fe8feae0b516abcd3d496c /llvm/lib | |
| parent | f047882b154d4ed7feb2c8315d3145a3ac1ec8ad (diff) | |
| download | bcm5719-llvm-3b6058c278071172633a4b7295173160326c78d3.tar.gz bcm5719-llvm-3b6058c278071172633a4b7295173160326c78d3.zip  | |
Remove over-general comparisons
llvm-svn: 33147
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp | 10 | 
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp index 70821f8f901..db0c492f723 100644 --- a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp +++ b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp @@ -1823,14 +1823,16 @@ public:      assert(ArgType->getTypeID() == Type::IntegerTyID &&             "llvm.cttz argument is not an integer?");      unsigned BitWidth = cast<IntegerType>(ArgType)->getBitWidth(); -    if (BitWidth <= 8) +    if (BitWidth == 8)        CTTZName = "llvm.cttz.i8"; -    else if (BitWidth <= 16) +    else if (BitWidth == 16)        CTTZName = "llvm.cttz.i16";  -    else if (BitWidth <= 32) +    else if (BitWidth == 32)        CTTZName = "llvm.cttz.i32"; -    else +    else { +      assert(BitWidth == 64 && "Unknown bitwidth");        CTTZName = "llvm.cttz.i64"; +    }      Constant *F = SLC.getModule()->getOrInsertFunction(CTTZName, ArgType,                                                         ArgType, NULL);  | 

