radeon/llvm: fix SelectADDR8BitOffset
authorChristian König <deathsimple@vodafone.de>
Fri, 31 Aug 2012 11:49:06 +0000 (13:49 +0200)
committerChristian König <deathsimple@vodafone.de>
Tue, 4 Sep 2012 08:51:11 +0000 (10:51 +0200)
The offset is unsigned, not signed.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp

index 63bc21edf56a081730041d8905ad6ee536491620..807113134d2be7b84224aa41d142c803aabb1538 100644 (file)
@@ -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);