[dragonegg] r210956 - Quick fix for dragonegg about CreateAtomicCmpXchg, corresponding llvm r210903.
NAKAMURA Takumi
geek4civic at gmail.com
Fri Jun 13 16:18:51 PDT 2014
Author: chapuni
Date: Fri Jun 13 18:18:51 2014
New Revision: 210956
URL: http://llvm.org/viewvc/llvm-project?rev=210956&view=rev
Log:
Quick fix for dragonegg about CreateAtomicCmpXchg, corresponding llvm r210903.
For now to follow r210903, simply extract i1 from ({i1,iN})Result.
Modified:
dragonegg/trunk/src/Convert.cpp
Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=210956&r1=210955&r2=210956&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Fri Jun 13 18:18:51 2014
@@ -4254,6 +4254,9 @@ TreeToLLVM::BuildCmpAndSwapAtomic(gimple
SequentiallyConsistent,
SequentiallyConsistent);
+ // AtomicCmpXchg has the type {i1,iN}.
+ Result = Builder.CreateExtractValue(Result, 0);
+
if (isBool)
Result = Builder.CreateICmpEQ(Result, Old_Val);
tree return_type = gimple_call_return_type(stmt);
More information about the llvm-commits
mailing list