diff options
author | Sanjay Patel <spatel@rotateright.com> | 2019-02-10 14:29:57 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2019-02-10 14:29:57 +0000 |
commit | 0c9f4335a38b922268c1373ed98326845f3d1a23 (patch) | |
tree | 5cee36999c658321ee1b83ad42b95fdc402a41f0 /include/llvm/CodeGen | |
parent | ea4b5cb48f9f277abbd823534cb5d21ca9670ff7 (diff) | |
download | llvm-0c9f4335a38b922268c1373ed98326845f3d1a23.tar.gz |
[TargetLowering] refactor setcc folds to fix another miscompile (PR40657)
SimplifySetCC still has much room for improvement, but this should
fix the remaining problem examples from:
https://bugs.llvm.org/show_bug.cgi?id=40657
The initial fix for this problem was rL353615.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353639 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/TargetLowering.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/TargetLowering.h b/include/llvm/CodeGen/TargetLowering.h index 31d43433c55..7bb5944d99a 100644 --- a/include/llvm/CodeGen/TargetLowering.h +++ b/include/llvm/CodeGen/TargetLowering.h @@ -3919,9 +3919,10 @@ public: SDValue lowerCmpEqZeroToCtlzSrl(SDValue Op, SelectionDAG &DAG) const; private: - SDValue simplifySetCCWithAnd(EVT VT, SDValue N0, SDValue N1, - ISD::CondCode Cond, DAGCombinerInfo &DCI, - const SDLoc &DL) const; + SDValue foldSetCCWithAnd(EVT VT, SDValue N0, SDValue N1, ISD::CondCode Cond, + const SDLoc &DL, DAGCombinerInfo &DCI) const; + SDValue foldSetCCWithBinOp(EVT VT, SDValue N0, SDValue N1, ISD::CondCode Cond, + const SDLoc &DL, DAGCombinerInfo &DCI) const; SDValue optimizeSetCCOfSignedTruncationCheck(EVT SCCVT, SDValue N0, SDValue N1, ISD::CondCode Cond, |