[llvm-commits] [llvm-gcc-4.2] r141660 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Tue Oct 11 03:12:27 PDT 2011
Author: baldrick
Date: Tue Oct 11 05:12:26 2011
New Revision: 141660
URL: http://llvm.org/viewvc/llvm-project?rev=141660&view=rev
Log:
Port commit 141538 (baldrick) from llvm-gcc. Original commit message:
Don't declare Result as a new variable here, shadowing the real Result.
Remove a pointless array while there.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=141660&r1=141659&r2=141660&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Tue Oct 11 05:12:26 2011
@@ -5904,16 +5904,12 @@
Emit(TREE_VALUE(arglist), 0),
Emit(TREE_VALUE(TREE_CHAIN(arglist)), 0)
};
- Type* Ty[2];
- Ty[0] = ResultTy;
- Ty[1] = ResultTy->getPointerTo();
- C[0] = Builder.CreateBitCast(C[0], Ty[1]);
- C[1] = Builder.CreateIntCast(C[1], Ty[0], !TYPE_UNSIGNED(TREE_TYPE(exp)),
+ C[0] = Builder.CreateBitCast(C[0], ResultTy->getPointerTo());
+ C[1] = Builder.CreateIntCast(C[1], ResultTy, !TYPE_UNSIGNED(TREE_TYPE(exp)),
"cast");
- llvm::Value *Result =
- Builder.CreateAtomicRMW(llvm::AtomicRMWInst::Nand, C[0], C[1],
- llvm::SequentiallyConsistent);
+ Result = Builder.CreateAtomicRMW(llvm::AtomicRMWInst::Nand, C[0], C[1],
+ llvm::SequentiallyConsistent);
Result = Builder.CreateAnd(Builder.CreateNot(Result), C[1]);
Result = Builder.CreateIntToPtr(Result, ResultTy);
More information about the llvm-commits
mailing list