From 18a86c95fc36b5f622e8dc87f71252de37a1ed44 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Wed, 3 Feb 2016 21:18:35 +0000 Subject: [PATCH] Merging r259645: ------------------------------------------------------------------------ r259645 | nemanjai | 2016-02-03 04:53:38 -0800 (Wed, 03 Feb 2016) | 4 lines Fix for PR 26381 Simple fix - Constant values were not being sign extended in FastIsel. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_38@259698 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCFastISel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Target/PowerPC/PPCFastISel.cpp b/lib/Target/PowerPC/PPCFastISel.cpp index b451ebf7f27..188c8e84c64 100644 --- a/lib/Target/PowerPC/PPCFastISel.cpp +++ b/lib/Target/PowerPC/PPCFastISel.cpp @@ -2108,7 +2108,7 @@ unsigned PPCFastISel::PPCMaterializeInt(const ConstantInt *CI, MVT VT, } // 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); -- 2.34.1