From: Christian König Date: Fri, 31 Aug 2012 11:49:06 +0000 (+0200) Subject: radeon/llvm: fix SelectADDR8BitOffset X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8758183f0aa7147310fb5c5e46a47f59c2d4bcc1;p=mesa.git radeon/llvm: fix SelectADDR8BitOffset The offset is unsigned, not signed. Signed-off-by: Christian König Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp b/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp index 63bc21edf56..807113134d2 100644 --- a/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp +++ b/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp @@ -337,7 +337,7 @@ bool AMDGPUDAGToDAGISel::SelectADDR8BitOffset(SDValue Addr, SDValue& Base, } // Check if the constant argument fits in 8-bits. The offset is in bytes // so we need to convert it to dwords. - if (isInt<8>(OffsetNode->getZExtValue() >> 2)) { + if (isUInt<8>(OffsetNode->getZExtValue() >> 2)) { Match = true; Offset = CurDAG->getTargetConstant(OffsetNode->getZExtValue() >> 2, MVT::i32);