diff options
| author | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2016-06-06 12:12:27 +0000 |
|---|---|---|
| committer | Johannes Doerfert <doerfert@cs.uni-saarland.de> | 2016-06-06 12:12:27 +0000 |
| commit | dedb7693ec2d6c37f7d6c36f13b562fd63903cca (patch) | |
| tree | 9e89730169a9c42e17494e7ccc226eebc3f8f6c4 /polly/lib/Support/SCEVAffinator.cpp | |
| parent | f21beb2c7461b3fb483a50ddfd4f92e29113887d (diff) | |
| download | bcm5719-llvm-dedb7693ec2d6c37f7d6c36f13b562fd63903cca.tar.gz bcm5719-llvm-dedb7693ec2d6c37f7d6c36f13b562fd63903cca.zip | |
Look through IntToPtr & PtrToInt instructions
IntToPtr and PtrToInt instructions are basically no-ops that we can handle as
such. In order to generate them properly as parameters we had to improve the
ScopExpander, though the change is the first in the direction of a more
aggressive scalar synthetization.
llvm-svn: 271888
Diffstat (limited to 'polly/lib/Support/SCEVAffinator.cpp')
| -rw-r--r-- | polly/lib/Support/SCEVAffinator.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/polly/lib/Support/SCEVAffinator.cpp b/polly/lib/Support/SCEVAffinator.cpp index 2f53227d70d..73e3a00ed2c 100644 --- a/polly/lib/Support/SCEVAffinator.cpp +++ b/polly/lib/Support/SCEVAffinator.cpp @@ -565,6 +565,10 @@ __isl_give PWACtx SCEVAffinator::visitSRemInstruction(Instruction *SRem) { __isl_give PWACtx SCEVAffinator::visitUnknown(const SCEVUnknown *Expr) { if (Instruction *I = dyn_cast<Instruction>(Expr->getValue())) { switch (I->getOpcode()) { + case Instruction::IntToPtr: + return visit(SE.getSCEVAtScope(I->getOperand(0), getScope())); + case Instruction::PtrToInt: + return visit(SE.getSCEVAtScope(I->getOperand(0), getScope())); case Instruction::SDiv: return visitSDivInstruction(I); case Instruction::SRem: |

