diff options
author | Vincent Lejeune <vljn@ovi.com> | 2013-11-06 17:36:04 +0000 |
---|---|---|
committer | Vincent Lejeune <vljn@ovi.com> | 2013-11-06 17:36:04 +0000 |
commit | 69239a98b69eefc70e68d82282b62583f6e92e10 (patch) | |
tree | 86d55f54146f04593db07b3b6afe0f5f298b6b0f /lib/Target/R600 | |
parent | 1b484aba80faa7be88aa93684b4740ac2d908595 (diff) | |
download | external_llvm-69239a98b69eefc70e68d82282b62583f6e92e10.zip external_llvm-69239a98b69eefc70e68d82282b62583f6e92e10.tar.gz external_llvm-69239a98b69eefc70e68d82282b62583f6e92e10.tar.bz2 |
R600: Fix LowerUDIVREM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600')
-rw-r--r-- | lib/Target/R600/AMDGPUISelLowering.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Target/R600/AMDGPUISelLowering.cpp b/lib/Target/R600/AMDGPUISelLowering.cpp index 0f3119d..36de482 100644 --- a/lib/Target/R600/AMDGPUISelLowering.cpp +++ b/lib/Target/R600/AMDGPUISelLowering.cpp @@ -625,13 +625,13 @@ SDValue AMDGPUTargetLowering::LowerUDIVREM(SDValue Op, SDValue Remainder_GE_Den = DAG.getSelectCC(DL, Remainder, Den, DAG.getConstant(-1, VT), DAG.getConstant(0, VT), - ISD::SETGE); - // Remainder_GE_Zero = (Remainder >= 0 ? -1 : 0) - SDValue Remainder_GE_Zero = DAG.getSelectCC(DL, Remainder, - DAG.getConstant(0, VT), + ISD::SETUGE); + // Remainder_GE_Zero = (Num >= Num_S_Remainder ? -1 : 0) + SDValue Remainder_GE_Zero = DAG.getSelectCC(DL, Num, + Num_S_Remainder, DAG.getConstant(-1, VT), DAG.getConstant(0, VT), - ISD::SETGE); + ISD::SETUGE); // Tmp1 = Remainder_GE_Den & Remainder_GE_Zero SDValue Tmp1 = DAG.getNode(ISD::AND, DL, VT, Remainder_GE_Den, Remainder_GE_Zero); |