[llvm] r259645 - Fix for PR 26381

Nemanja Ivanovic via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 04:53:39 PST 2016


Author: nemanjai
Date: Wed Feb  3 06:53:38 2016
New Revision: 259645

URL: http://llvm.org/viewvc/llvm-project?rev=259645&view=rev
Log:
Fix for PR 26381

Simple fix - Constant values were not being sign extended in FastIsel.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp?rev=259645&r1=259644&r2=259645&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCFastISel.cpp Wed Feb  3 06:53:38 2016
@@ -2105,7 +2105,7 @@ unsigned PPCFastISel::PPCMaterializeInt(
   }
 
   // Construct the constant piecewise.
-  int64_t Imm = CI->getZExtValue();
+  int64_t Imm = UseSExt ? CI->getSExtValue() : CI->getZExtValue();
   if (VT == MVT::i64)
     return PPCMaterialize64BitInt(Imm, RC);
   else if (VT == MVT::i32)




More information about the llvm-commits mailing list