summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-03-06 18:30:00 +0000
committerNikita Popov <nikita.ppv@gmail.com>2019-03-06 18:30:00 +0000
commit884feb1b69f965dd57739defeca0d9943b40a47d (patch)
tree349f1382b8be6c9987fc4206717c4862f3a30846 /llvm/lib/Transforms/InstCombine/InstCombineInternal.h
parent11308bdb433e1ebd759fb4a509f9a8002bea1e92 (diff)
downloadbcm5719-llvm-884feb1b69f965dd57739defeca0d9943b40a47d.tar.gz
bcm5719-llvm-884feb1b69f965dd57739defeca0d9943b40a47d.zip
[InstCombine] Fold add nsw + sadd.with.overflow
Fold `add nsw` and `sadd.with.overflow` with constants if the addition does not overflow. Part of https://bugs.llvm.org/show_bug.cgi?id=38146. Patch by Dan Robertson. Differential Revision: https://reviews.llvm.org/D58881 llvm-svn: 355530
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineInternal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
index 5b0c7fce0d1..e4e6228a047 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
+++ b/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
@@ -592,6 +592,8 @@ private:
Value *matchSelectFromAndOr(Value *A, Value *B, Value *C, Value *D);
Value *getSelectCondition(Value *A, Value *B);
+ Instruction *foldIntrinsicWithOverflowCommon(IntrinsicInst *II);
+
public:
/// Inserts an instruction \p New before instruction \p Old
///
OpenPOWER on IntegriCloud