[llvm] r223940 - R600/SI: Use getTargetConstant in AdjustRegClass

Marek Olsak marek.olsak at amd.com
Wed Dec 10 11:25:31 PST 2014


Author: mareko
Date: Wed Dec 10 13:25:31 2014
New Revision: 223940

URL: http://llvm.org/viewvc/llvm-project?rev=223940&view=rev
Log:
R600/SI: Use getTargetConstant in AdjustRegClass

Modified:
    llvm/trunk/lib/Target/R600/SIISelLowering.cpp

Modified: llvm/trunk/lib/Target/R600/SIISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/R600/SIISelLowering.cpp?rev=223940&r1=223939&r2=223940&view=diff
==============================================================================
--- llvm/trunk/lib/Target/R600/SIISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/R600/SIISelLowering.cpp Wed Dec 10 13:25:31 2014
@@ -2159,9 +2159,9 @@ MachineSDNode *SITargetLowering::AdjustR
 
     // The immediate offset is in dwords on SI and in bytes on VI.
     if (Subtarget->getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS)
-      Ops.push_back(DAG.getConstant(Offset->getSExtValue(), MVT::i32));
+      Ops.push_back(DAG.getTargetConstant(Offset->getSExtValue(), MVT::i32));
     else
-      Ops.push_back(DAG.getConstant(Offset->getSExtValue() << 2, MVT::i32));
+      Ops.push_back(DAG.getTargetConstant(Offset->getSExtValue() << 2, MVT::i32));
 
     // Copy remaining operands so we keep any chain and glue nodes that follow
     // the normal operands.





More information about the llvm-commits mailing list