Skip to content

Commit

Permalink
Fix for PR 26381
Browse files Browse the repository at this point in the history
Simple fix - Constant values were not being sign extended in FastIsel.

llvm-svn: 259645
  • Loading branch information
nemanjai committed Feb 3, 2016
1 parent 1b6785a commit 82e1168
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/PowerPC/PPCFastISel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 82e1168

Please sign in to comment.