diff options
| author | Andrew Lenharth <andrewl@lenharth.org> | 2008-02-16 14:46:26 +0000 |
|---|---|---|
| committer | Andrew Lenharth <andrewl@lenharth.org> | 2008-02-16 14:46:26 +0000 |
| commit | fedcf477b520194ec59975ba26a67cff09250857 (patch) | |
| tree | d852bced132141ad71fa5c185696113bb9b02aed /llvm/lib/CodeGen | |
| parent | b289516a7157ba53f906c583b5e74708a9cdbf63 (diff) | |
| download | bcm5719-llvm-fedcf477b520194ec59975ba26a67cff09250857.tar.gz bcm5719-llvm-fedcf477b520194ec59975ba26a67cff09250857.zip | |
I cannot find a libgcc function for this builtin. Therefor expanding it to a noop (which is how it use to be treated). If someone who knows the x86 backend better than me could tell me how to get a lock prefix on an instruction, that would be nice to complete x86 support.
llvm-svn: 47213
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 0d6a47c0136..9355e4871fe 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1135,11 +1135,21 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { case ISD::MEMBARRIER: { assert(Node->getNumOperands() == 6 && "Invalid MemBarrier node!"); - SDOperand Ops[6]; - Ops[0] = LegalizeOp(Node->getOperand(0)); // Legalize the chain. - for (int x = 1; x < 6; ++x) - Ops[x] = PromoteOp(Node->getOperand(x)); - Result = DAG.UpdateNodeOperands(Result, &Ops[0], 6); + switch (TLI.getOperationAction(ISD::MEMBARRIER, MVT::Other)) { + default: assert(0 && "This action is not supported yet!"); + case TargetLowering::Legal: { + SDOperand Ops[6]; + Ops[0] = LegalizeOp(Node->getOperand(0)); // Legalize the chain. + for (int x = 1; x < 6; ++x) + Ops[x] = PromoteOp(Node->getOperand(x)); + Result = DAG.UpdateNodeOperands(Result, &Ops[0], 6); + break; + } + case TargetLowering::Expand: + //There is no libgcc call for this op + Result = Node->getOperand(0); // Noop + break; + } break; } |

