summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCFastISel.cpp
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-02-03 12:53:38 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2016-02-03 12:53:38 +0000
commit82e1168989fd42bbb82a4536568773269f499f40 (patch)
tree2876e4c30647bd0ac5614e70abe04cf6797a1ba0 /llvm/lib/Target/PowerPC/PPCFastISel.cpp
parent1b6785a1dff62e0105ed2327e4934595efcf1220 (diff)
downloadbcm5719-llvm-82e1168989fd42bbb82a4536568773269f499f40.tar.gz
bcm5719-llvm-82e1168989fd42bbb82a4536568773269f499f40.zip
Fix for PR 26381
Simple fix - Constant values were not being sign extended in FastIsel. llvm-svn: 259645
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCFastISel.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCFastISel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCFastISel.cpp b/llvm/lib/Target/PowerPC/PPCFastISel.cpp
index c4090fb2bf7..795fd6d0b7a 100644
--- a/llvm/lib/Target/PowerPC/PPCFastISel.cpp
+++ b/llvm/lib/Target/PowerPC/PPCFastISel.cpp
@@ -2105,7 +2105,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);
else if (VT == MVT::i32)
OpenPOWER on IntegriCloud