aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-03-06 01:41:59 +0000
committerDale Johannesen <dalej@apple.com>2009-03-06 01:41:59 +0000
commit5981f6b7e74a0bb0a60d94490fe97ff3aa51444f (patch)
treed9adf347d1ac0e6dd22680160d96366a4b14f60e /lib/Transforms/Scalar/Reassociate.cpp
parent4e14b6588e441534f2b2fc806261a9fe126ae520 (diff)
downloadexternal_llvm-5981f6b7e74a0bb0a60d94490fe97ff3aa51444f.zip
external_llvm-5981f6b7e74a0bb0a60d94490fe97ff3aa51444f.tar.gz
external_llvm-5981f6b7e74a0bb0a60d94490fe97ff3aa51444f.tar.bz2
Don't assign rank numbers to debug intrinsic "calls".
This is needed so debug info doesn't change codegen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--lib/Transforms/Scalar/Reassociate.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/Reassociate.cpp b/lib/Transforms/Scalar/Reassociate.cpp
index c33e320..cf5887e 100644
--- a/lib/Transforms/Scalar/Reassociate.cpp
+++ b/lib/Transforms/Scalar/Reassociate.cpp
@@ -26,6 +26,7 @@
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
#include "llvm/Instructions.h"
+#include "llvm/IntrinsicInst.h"
#include "llvm/Pass.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/Support/CFG.h"
@@ -120,7 +121,8 @@ static bool isUnmovableInstruction(Instruction *I) {
I->getOpcode() == Instruction::Load ||
I->getOpcode() == Instruction::Malloc ||
I->getOpcode() == Instruction::Invoke ||
- I->getOpcode() == Instruction::Call ||
+ (I->getOpcode() == Instruction::Call &&
+ !isa<DbgInfoIntrinsic>(I)) ||
I->getOpcode() == Instruction::UDiv ||
I->getOpcode() == Instruction::SDiv ||
I->getOpcode() == Instruction::FDiv ||