Mesa (master): radeon/llvm: fix SelectADDR8BitOffset

Christian König deathsimple at kemper.freedesktop.org
Tue Sep 4 08:51:55 UTC 2012


Module: Mesa
Branch: master
Commit: 8758183f0aa7147310fb5c5e46a47f59c2d4bcc1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8758183f0aa7147310fb5c5e46a47f59c2d4bcc1

Author: Christian König <deathsimple at vodafone.de>
Date:   Fri Aug 31 13:49:06 2012 +0200

radeon/llvm: fix SelectADDR8BitOffset

The offset is unsigned, not signed.

Signed-off-by: Christian König <deathsimple at vodafone.de>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

---

 src/gallium/drivers/radeon/AMDILISelDAGToDAG.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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);




More information about the mesa-commit mailing list