diff options
| author | Cameron McInally <cameron.mcinally@nyu.edu> | 2019-05-06 16:05:10 +0000 |
|---|---|---|
| committer | Cameron McInally <cameron.mcinally@nyu.edu> | 2019-05-06 16:05:10 +0000 |
| commit | c3167696bc3758efc9c1e98c63ef653951567a2a (patch) | |
| tree | 11bd9667e4111a622fb3783221fc035df3acaf77 /llvm/include | |
| parent | 3379fb599d50214be84ad1c03e76381b271844f7 (diff) | |
| download | bcm5719-llvm-c3167696bc3758efc9c1e98c63ef653951567a2a.tar.gz bcm5719-llvm-c3167696bc3758efc9c1e98c63ef653951567a2a.zip | |
Add FNeg support to InstructionSimplify
Differential Revision: https://reviews.llvm.org/D61573
llvm-svn: 360053
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Analysis/InstructionSimplify.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/InstructionSimplify.h b/llvm/include/llvm/Analysis/InstructionSimplify.h index a9040439d94..531000b675b 100644 --- a/llvm/include/llvm/Analysis/InstructionSimplify.h +++ b/llvm/include/llvm/Analysis/InstructionSimplify.h @@ -117,6 +117,10 @@ struct SimplifyQuery { // deprecated. // Please use the SimplifyQuery versions in new code. +/// Given operand for an FNeg, fold the result or return null. +Value *SimplifyFNegInst(Value *Op, FastMathFlags FMF, + const SimplifyQuery &Q); + /// Given operands for an Add, fold the result or return null. Value *SimplifyAddInst(Value *LHS, Value *RHS, bool isNSW, bool isNUW, const SimplifyQuery &Q); @@ -227,6 +231,15 @@ Value *SimplifyShuffleVectorInst(Value *Op0, Value *Op1, Constant *Mask, Value *SimplifyCmpInst(unsigned Predicate, Value *LHS, Value *RHS, const SimplifyQuery &Q); +/// Given operand for a UnaryOperator, fold the result or return null. +Value *SimplifyUnOp(unsigned Opcode, Value *Op, const SimplifyQuery &Q); + +/// Given operand for an FP UnaryOperator, fold the result or return null. +/// In contrast to SimplifyUnOp, try to use FastMathFlag when folding the +/// result. In case we don't need FastMathFlags, simply fall to SimplifyUnOp. +Value *SimplifyFPUnOp(unsigned Opcode, Value *Op, FastMathFlags FMF, + const SimplifyQuery &Q); + /// Given operands for a BinaryOperator, fold the result or return null. Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS, const SimplifyQuery &Q); |

