summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2008-08-03 20:17:34 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2008-08-03 20:17:34 +0000
commit77e3e86e70a98afab01752965d6bd738719b8d68 (patch)
treea1bedf86d9932386f5ca0262a79ed5ef7229f139
parent796e9be3b12db3207ee43422dee5d8b97f089a5f (diff)
downloadbcm5719-llvm-77e3e86e70a98afab01752965d6bd738719b8d68.tar.gz
bcm5719-llvm-77e3e86e70a98afab01752965d6bd738719b8d68.zip
Add atomic sub for other sizes
llvm-svn: 54314
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 6f8b1ec7cc0..7870cb0c164 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -296,6 +296,8 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
setOperationAction(ISD::ATOMIC_CMP_SWAP , MVT::i16, Custom);
setOperationAction(ISD::ATOMIC_CMP_SWAP , MVT::i32, Custom);
setOperationAction(ISD::ATOMIC_CMP_SWAP , MVT::i64, Custom);
+ setOperationAction(ISD::ATOMIC_LOAD_SUB , MVT::i8, Expand);
+ setOperationAction(ISD::ATOMIC_LOAD_SUB , MVT::i16, Expand);
setOperationAction(ISD::ATOMIC_LOAD_SUB , MVT::i32, Expand);
// Use the default ISD::DBG_STOPPOINT, ISD::DECLARE expansion.
@@ -5880,7 +5882,6 @@ SDNode* X86TargetLowering::ExpandATOMIC_CMP_SWAP(SDNode* Op, SelectionDAG &DAG)
SDNode* X86TargetLowering::ExpandATOMIC_LOAD_SUB(SDNode* Op, SelectionDAG &DAG) {
MVT T = Op->getValueType(0);
- assert (T == MVT::i32 && "Only know how to expand i32 Atomic Load Sub");
SDValue negOp = DAG.getNode(ISD::SUB, T,
DAG.getConstant(0, T), Op->getOperand(2));
return DAG.getAtomic(ISD::ATOMIC_LOAD_ADD, Op->getOperand(0),
OpenPOWER on IntegriCloud