diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-01-18 23:22:07 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-01-18 23:22:07 +0000 | 
| commit | e1c01e4e2b5e524ae07d37a2d4816326f78a3124 (patch) | |
| tree | 08a1409b132498e62e5ee56f558415eb31f60b54 | |
| parent | 6e2c6844c1d89f05410b7bef33bb53f3c9a26058 (diff) | |
| download | bcm5719-llvm-e1c01e4e2b5e524ae07d37a2d4816326f78a3124.tar.gz bcm5719-llvm-e1c01e4e2b5e524ae07d37a2d4816326f78a3124.zip  | |
Make this a bit more explicit about which cases need the 
check.  No functionality change.
llvm-svn: 62474
| -rw-r--r-- | llvm/lib/Transforms/Utils/SimplifyCFG.cpp | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp index 366021e6480..1a0b0b4b66d 100644 --- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp @@ -969,14 +969,18 @@ static bool SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *BB1) {    default: return false;  // Not safe / profitable to hoist.    case Instruction::Add:    case Instruction::Sub: +    // FP arithmetic might trap. Not worth doing for vector ops. +    if (I->getType()->isFloatingPoint() || isa<VectorType>(I->getType())) +      return false; +    break;    case Instruction::And:    case Instruction::Or:    case Instruction::Xor:    case Instruction::Shl:    case Instruction::LShr:    case Instruction::AShr: -    if (!I->getOperand(0)->getType()->isInteger()) -      // FP arithmetic might trap. Not worth doing for vector ops. +    // Don't mess with vector operations. +    if (isa<VectorType>(I->getType()))        return false;      break;   // These are all cheap and non-trapping instructions.    }  | 

