aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2013-09-11 05:09:35 +0000
committerMatt Arsenault <Matthew.Arsenault@amd.com>2013-09-11 05:09:35 +0000
commit5df49bd7036e79d1b39326340e7aaeb27eb9541c (patch)
tree31935cf28de1a2681b9e95afdc708a8bf20d0b01
parent9b866c2312b3f2de902df91f408d60735b9b3837 (diff)
downloadllvm-5df49bd7036e79d1b39326340e7aaeb27eb9541c.zip
llvm-5df49bd7036e79d1b39326340e7aaeb27eb9541c.tar.gz
llvm-5df49bd7036e79d1b39326340e7aaeb27eb9541c.tar.bz2
Add braces
llvm-svn: 190490
-rw-r--r--llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
index 07d991b..20fccea 100644
--- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
@@ -988,10 +988,9 @@ processLoopStridedStore(Value *DestPtr, unsigned StoreSize,
Expander.expandCodeFor(Ev->getStart(), Builder.getInt8PtrTy(AddrSpace),
Preheader->getTerminator());
-
if (mayLoopAccessLocation(BasePtr, AliasAnalysis::ModRef,
CurLoop, BECount,
- StoreSize, getAnalysis<AliasAnalysis>(), TheStore)){
+ StoreSize, getAnalysis<AliasAnalysis>(), TheStore)) {
Expander.clear();
// If we generated new code for the base pointer, clean up.
deleteIfDeadInstruction(BasePtr, *SE, TLI);
@@ -1007,17 +1006,21 @@ processLoopStridedStore(Value *DestPtr, unsigned StoreSize,
const SCEV *NumBytesS = SE->getAddExpr(BECount, SE->getConstant(IntPtr, 1),
SCEV::FlagNUW);
- if (StoreSize != 1)
+ if (StoreSize != 1) {
NumBytesS = SE->getMulExpr(NumBytesS, SE->getConstant(IntPtr, StoreSize),
SCEV::FlagNUW);
+ }
Value *NumBytes =
Expander.expandCodeFor(NumBytesS, IntPtr, Preheader->getTerminator());
CallInst *NewCall;
- if (SplatValue)
- NewCall = Builder.CreateMemSet(BasePtr, SplatValue,NumBytes,StoreAlignment);
- else {
+ if (SplatValue) {
+ NewCall = Builder.CreateMemSet(BasePtr,
+ SplatValue,
+ NumBytes,
+ StoreAlignment);
+ } else {
Module *M = TheStore->getParent()->getParent()->getParent();
Value *MSP = M->getOrInsertFunction("memset_pattern16",
Builder.getVoidTy(),