1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

don't be a doofus - this fixes storing bools

llvm-svn: 25274
This commit is contained in:
Duraid Madina 2006-01-13 10:28:25 +00:00
parent 4107b4d7ee
commit e8b42dc96d

View File

@ -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);