1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

Fix handling of 'load' nodes.

llvm-svn: 105269
This commit is contained in:
Kalle Raiskila 2010-06-01 13:34:47 +00:00
parent b6441d41de
commit ed7364d3e1
2 changed files with 15 additions and 8 deletions

View File

@ -611,13 +611,7 @@ SPUDAGToDAGISel::DFormAddressPredicate(SDNode *Op, SDValue N, SDValue &Base,
if (OpOpc == ISD::STORE || OpOpc == ISD::LOAD) {
// Direct load/store without getelementptr
SDValue Addr, Offs;
// Get the register from CopyFromReg
if (Opc == ISD::CopyFromReg)
Addr = N.getOperand(1);
else
Addr = N; // Register
SDValue Offs;
Offs = ((OpOpc == ISD::STORE) ? Op->getOperand(3) : Op->getOperand(2));
@ -626,7 +620,7 @@ SPUDAGToDAGISel::DFormAddressPredicate(SDNode *Op, SDValue N, SDValue &Base,
Offs = CurDAG->getTargetConstant(0, Offs.getValueType());
Base = Offs;
Index = Addr;
Index = N;
return true;
}
} else {

View File

@ -18,3 +18,16 @@ entry:
ret <4 x float> %tmp1
; CHECK: lqd $3, 16($3)
}
declare <4 x i32>* @getv4f32ptr()
define <4 x i32> @func() {
;CHECK: brasl
;CHECK: lr {{\$[0-9]*, \$3}}
;CHECK: brasl
%rv1 = call <4 x i32>* @getv4f32ptr()
%rv2 = call <4 x i32>* @getv4f32ptr()
%rv3 = load <4 x i32>* %rv1
ret <4 x i32> %rv3
}