[Mesa-dev] [PATCH 1/4] radeon/llvm: fix SelectADDR8BitOffset

Christian König deathsimple at vodafone.de
Mon Sep 3 07:33:39 PDT 2012


The offset is unsigned, not signed.

Signed-off-by: Christian König <deathsimple at vodafone.de>
---
 src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp b/src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp
index 63bc21e..8071131 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);
-- 
1.7.9.5



More information about the mesa-dev mailing list