mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-03 02:08:54 +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);
|
||||
|
||||
LoadInst *Orig = Builder.CreateLoad(Ptr);
|
||||
Value *Res;
|
||||
Value *Res = NULL;
|
||||
switch (IID) {
|
||||
default: assert(0 && "Unrecognized atomic modify operation");
|
||||
case Intrinsic::atomic_load_add:
|
||||
Res = Builder.CreateAdd(Orig, Delta);
|
||||
break;
|
||||
@ -92,7 +93,6 @@ bool LowerAtomicIntrinsic(CallInst *CI) {
|
||||
Orig,
|
||||
Delta);
|
||||
break;
|
||||
default: assert(0 && "Unrecognized atomic modify operation");
|
||||
}
|
||||
Builder.CreateStore(Res, Ptr);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user