diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-05-20 03:50:52 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-05-20 03:50:52 +0000 | 
| commit | 9c27f96d04fd0b737db06ec9e5aa1cd27def5049 (patch) | |
| tree | 29d85a1140458cf321fd399093741b80b3d56ff1 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
| parent | f479856957ac0749102d59ddf583edf6ba04434a (diff) | |
| download | bcm5719-llvm-9c27f96d04fd0b737db06ec9e5aa1cd27def5049.tar.gz bcm5719-llvm-9c27f96d04fd0b737db06ec9e5aa1cd27def5049.zip | |
fix two issues Neil noticed, thanks!
llvm-svn: 51296
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 82d9fa87432..b7a403d8e9b 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -5435,7 +5435,7 @@ Instruction *InstCombiner::FoldFCmp_IntToFP_Cst(FCmpInst &I,    // Now we know that the APFloat is a normal number, zero or inf. -  // See if the FP constant is top large for the integer.  For example, +  // See if the FP constant is too large for the integer.  For example,    // comparing an i8 to 300.0.    unsigned IntWidth = IntTy->getPrimitiveSizeInBits(); @@ -5561,10 +5561,10 @@ Instruction *InstCombiner::visitFCmpInst(FCmpInst &I) {        if (CFP->getValueAPF().isNaN()) {          if (FCmpInst::isOrdered(I.getPredicate()))   // True if ordered and...            return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 0)); -        if (FCmpInst::isUnordered(I.getPredicate())) // True if unordered or... -          return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1)); -        if (FCmpInst::isUnordered(I.getPredicate())) // Undef on unordered. -          return ReplaceInstUsesWith(I, UndefValue::get(Type::Int1Ty)); +        assert(FCmpInst::isUnordered(I.getPredicate()) && +               "Comparison must be either ordered or unordered!"); +        // True if unordered. +        return ReplaceInstUsesWith(I, ConstantInt::get(Type::Int1Ty, 1));        }      } | 

