mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-20 08:54:08 +00:00
Fix uninitialized variable warning.
Also move 'default' case next to a real case to help compiler optimize in non-Debug builds. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110435 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c9dcbed6a3
commit
e52e9d6045
@ -52,8 +52,9 @@ bool LowerAtomicIntrinsic(CallInst *CI) {
|
|||||||
Value *Delta = CI->getArgOperand(1);
|
Value *Delta = CI->getArgOperand(1);
|
||||||
|
|
||||||
LoadInst *Orig = Builder.CreateLoad(Ptr);
|
LoadInst *Orig = Builder.CreateLoad(Ptr);
|
||||||
Value *Res;
|
Value *Res = NULL;
|
||||||
switch (IID) {
|
switch (IID) {
|
||||||
|
default: assert(0 && "Unrecognized atomic modify operation");
|
||||||
case Intrinsic::atomic_load_add:
|
case Intrinsic::atomic_load_add:
|
||||||
Res = Builder.CreateAdd(Orig, Delta);
|
Res = Builder.CreateAdd(Orig, Delta);
|
||||||
break;
|
break;
|
||||||
@ -92,7 +93,6 @@ bool LowerAtomicIntrinsic(CallInst *CI) {
|
|||||||
Orig,
|
Orig,
|
||||||
Delta);
|
Delta);
|
||||||
break;
|
break;
|
||||||
default: assert(0 && "Unrecognized atomic modify operation");
|
|
||||||
}
|
}
|
||||||
Builder.CreateStore(Res, Ptr);
|
Builder.CreateStore(Res, Ptr);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user