[llvm-commits] CVS: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp

Duraid Madina duraid at octopus.com.au
Fri Jan 13 02:28:44 PST 2006



Changes in directory llvm/lib/Target/IA64:

IA64ISelDAGToDAG.cpp updated: 1.19 -> 1.20
---
Log message:

don't be a doofus - this fixes storing bools



---
Diffs of the changes:  (+5 -2)

 IA64ISelDAGToDAG.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp
diff -u llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.19 llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.20
--- llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp:1.19	Wed Jan 11 13:53:22 2006
+++ llvm/lib/Target/IA64/IA64ISelDAGToDAG.cpp	Fri Jan 13 04:28:25 2006
@@ -571,9 +571,12 @@
       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);






More information about the llvm-commits mailing list