diff options
author | Chen Zheng <czhengsz@cn.ibm.com> | 2019-07-11 02:18:22 +0000 |
---|---|---|
committer | Chen Zheng <czhengsz@cn.ibm.com> | 2019-07-11 02:18:22 +0000 |
commit | 627095ec5be18e9a628f2aad5f057425ffbc2505 (patch) | |
tree | 94e937e7526f45be9ed253dc4eeb823dca15e6ec /llvm/lib/Analysis/ConstantFolding.cpp | |
parent | e837847ec64aa9420ed4ccecd40ba987e1a7338b (diff) | |
download | bcm5719-llvm-627095ec5be18e9a628f2aad5f057425ffbc2505.tar.gz bcm5719-llvm-627095ec5be18e9a628f2aad5f057425ffbc2505.zip |
[SCEV] teach SCEV symbolical execution about overflow intrinsics folding.
Differential Revision: https://reviews.llvm.org/D64422
llvm-svn: 365726
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index a5128342a7a..20231ca78b4 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -1036,6 +1036,9 @@ Constant *ConstantFoldInstOperandsImpl(const Value *InstOrCE, unsigned Opcode, return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]); case Instruction::ExtractElement: return ConstantExpr::getExtractElement(Ops[0], Ops[1]); + case Instruction::ExtractValue: + return ConstantExpr::getExtractValue( + Ops[0], dyn_cast<ExtractValueInst>(InstOrCE)->getIndices()); case Instruction::InsertElement: return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]); case Instruction::ShuffleVector: |