diff options
Diffstat (limited to 'lib/Target/CBackend')
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 4036d08..2ace6eb 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -3205,11 +3205,12 @@ void CWriter::visitShuffleVectorInst(ShuffleVectorInst &SVI) { Out << "(("; printType(Out, PointerType::getUnqual(EltTy)); Out << ")(&" << GetValueName(Op) - << "))[" << (SrcVal & NumElts-1) << "]"; + << "))[" << (SrcVal & (NumElts-1)) << "]"; } else if (isa<ConstantAggregateZero>(Op) || isa<UndefValue>(Op)) { Out << "0"; } else { - printConstant(cast<ConstantVector>(Op)->getOperand(SrcVal & NumElts-1)); + printConstant(cast<ConstantVector>(Op)->getOperand(SrcVal & + (NumElts-1))); } } } |