diff options
author | Li Jia He <hljhehlj@cn.ibm.com> | 2018-10-26 06:48:53 +0000 |
---|---|---|
committer | Li Jia He <hljhehlj@cn.ibm.com> | 2018-10-26 06:48:53 +0000 |
commit | f6fb752fe80f05e57b4b6928597d1113a558a7c1 (patch) | |
tree | eb420d91f41670cabc3f3ad5e53915d90e81ccc9 /llvm/lib/Target/PowerPC/PPCISelLowering.h | |
parent | 95214673181458834976505992216a30465f3b9a (diff) | |
download | bcm5719-llvm-f6fb752fe80f05e57b4b6928597d1113a558a7c1.tar.gz bcm5719-llvm-f6fb752fe80f05e57b4b6928597d1113a558a7c1.zip |
[PowerPC] Fix some missed optimization opportunities in combineSetCC
For both operands are bool, short, int, long, long long, add the following optimization.
1. 0-x == y --> x+y ==0
2. 0-x != y --> x+y != 0
Review: nemanjai
Differential Revision: https://reviews.llvm.org/D53360
llvm-svn: 345366
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCISelLowering.h')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelLowering.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.h b/llvm/lib/Target/PowerPC/PPCISelLowering.h index 081e7a92bf2..d597e9348a1 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.h +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.h @@ -1097,6 +1097,7 @@ namespace llvm { SDValue combineSRL(SDNode *N, DAGCombinerInfo &DCI) const; SDValue combineADD(SDNode *N, DAGCombinerInfo &DCI) const; SDValue combineTRUNCATE(SDNode *N, DAGCombinerInfo &DCI) const; + SDValue combineSetCC(SDNode *N, DAGCombinerInfo &DCI) const; /// ConvertSETCCToSubtract - looks at SETCC that compares ints. It replaces /// SETCC with integer subtraction when (1) there is a legal way of doing it |