diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-24 02:09:29 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-24 02:09:29 +0000 |
commit | d7ef3f804dfccae0f38506294bbaf91272cdb59c (patch) | |
tree | b4026d837fe2a29571ab7bf0a6c73b8734f443e6 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 5af36e7e7c07adb0ade7c415f2639937a9c1d847 (diff) | |
download | bcm5719-llvm-d7ef3f804dfccae0f38506294bbaf91272cdb59c.tar.gz bcm5719-llvm-d7ef3f804dfccae0f38506294bbaf91272cdb59c.zip |
Fix CodeGen/Generic/2007-02-23-DAGCombine-Miscompile.ll and PR1219
llvm-svn: 34551
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 623d9a1c0fe..073588cd12b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -1459,11 +1459,11 @@ TargetLowering::SimplifySetCC(MVT::ValueType VT, SDOperand N0, SDOperand N1, case ISD::SETGT: case ISD::SETGE: // True if the sign bit of C1 is set. - return DAG.getConstant((C1 & (1ULL << VSize)) != 0, VT); + return DAG.getConstant((C1 & (1ULL << (VSize-1))) != 0, VT); case ISD::SETLT: case ISD::SETLE: // True if the sign bit of C1 isn't set. - return DAG.getConstant((C1 & (1ULL << VSize)) == 0, VT); + return DAG.getConstant((C1 & (1ULL << (VSize-1))) == 0, VT); default: break; } |