diff options
author | Duraid Madina <duraid@octopus.com.au> | 2006-01-13 10:28:25 +0000 |
---|---|---|
committer | Duraid Madina <duraid@octopus.com.au> | 2006-01-13 10:28:25 +0000 |
commit | 544cbbd479e5fb5ca977f86c089565df12ea7923 (patch) | |
tree | 76d5b869bacb000eb539855e996946912710e90f | |
parent | 140d53c99c3a70b9d3858a3c87f8ecb098994748 (diff) | |
download | external_llvm-544cbbd479e5fb5ca977f86c089565df12ea7923.zip external_llvm-544cbbd479e5fb5ca977f86c089565df12ea7923.tar.gz external_llvm-544cbbd479e5fb5ca977f86c089565df12ea7923.tar.bz2 |
don't be a doofus - this fixes storing bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25274 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/IA64/IA64ISelDAGToDAG.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/IA64/IA64ISelDAGToDAG.cpp b/lib/Target/IA64/IA64ISelDAGToDAG.cpp index 41ae993..f8827ea 100644 --- a/lib/Target/IA64/IA64ISelDAGToDAG.cpp +++ b/lib/Target/IA64/IA64ISelDAGToDAG.cpp @@ -571,9 +571,12 @@ SDOperand IA64DAGToDAGISel::Select(SDOperand Op) { default: assert(0 && "unknown type in store"); case MVT::i1: { // this is a bool Opc = IA64::ST1; // we store either 0 or 1 as a byte + // first load zero! + SDOperand Initial = CurDAG->getCopyFromReg(Chain, IA64::r0, MVT::i64); + Chain = Initial.getValue(1); + // then load 1 iff the predicate to store is 1 SDOperand Tmp = - CurDAG->getTargetNode(IA64::PADDS, MVT::i64, - CurDAG->getRegister(IA64::r0, MVT::i64), + CurDAG->getTargetNode(IA64::PADDS, MVT::i64, Initial, CurDAG->getConstant(1, MVT::i64), Select(N->getOperand(1))); return CurDAG->SelectNodeTo(N, Opc, MVT::Other, Address, Tmp, Chain); |