aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-07-27 22:21:52 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-07-27 22:21:52 +0000
commit14648468011c92a4210f8118721d58c25043daf8 (patch)
tree287882ae779b0bd87f8e9a7996fae00d99785a59 /lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
parent144da2c8f03834e76ddb617498be7ed864a5c192 (diff)
downloadexternal_llvm-14648468011c92a4210f8118721d58c25043daf8.tar.gz
external_llvm-14648468011c92a4210f8118721d58c25043daf8.tar.bz2
external_llvm-14648468011c92a4210f8118721d58c25043daf8.zip
Code generation for 'fence' instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index aadfa26420..a3dd36e288 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -2955,8 +2955,10 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node,
Results.push_back(DAG.getConstant(0, MVT::i32));
Results.push_back(Node->getOperand(0));
break;
+ case ISD::ATOMIC_FENCE:
case ISD::MEMBARRIER: {
// If the target didn't lower this, lower it to '__sync_synchronize()' call
+ // FIXME: handle "fence singlethread" more efficiently.
TargetLowering::ArgListTy Args;
std::pair<SDValue, SDValue> CallResult =
TLI.LowerCallTo(Node->getOperand(0), Type::getVoidTy(*DAG.getContext()),