[llvm-commits] [llvm] r105710 - in /llvm/trunk: lib/Target/CellSPU/SPUISelDAGToDAG.cpp test/CodeGen/CellSPU/loads.ll
Kalle Raiskila
kalle.raiskila at nokia.com
Wed Jun 9 01:29:41 PDT 2010
Author: kraiskil
Date: Wed Jun 9 03:29:41 2010
New Revision: 105710
URL: http://llvm.org/viewvc/llvm-project?rev=105710&view=rev
Log:
Handle loading from/storing to undef pointers on SPU by inserting a
random load/store, rather than crashing llc.
Modified:
llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
llvm/trunk/test/CodeGen/CellSPU/loads.ll
Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=105710&r1=105709&r2=105710&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Wed Jun 9 03:29:41 2010
@@ -606,7 +606,9 @@
Base = CurDAG->getTargetConstant(0, N.getValueType());
Index = N;
return true;
- } else if (Opc == ISD::Register || Opc == ISD::CopyFromReg) {
+ } else if (Opc == ISD::Register
+ ||Opc == ISD::CopyFromReg
+ ||Opc == ISD::UNDEF) {
unsigned OpOpc = Op->getOpcode();
if (OpOpc == ISD::STORE || OpOpc == ISD::LOAD) {
Modified: llvm/trunk/test/CodeGen/CellSPU/loads.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/CellSPU/loads.ll?rev=105710&r1=105709&r2=105710&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/CellSPU/loads.ll (original)
+++ llvm/trunk/test/CodeGen/CellSPU/loads.ll Wed Jun 9 03:29:41 2010
@@ -31,3 +31,8 @@
ret <4 x i32> %rv3
}
+define <4 x float> @load_undef(){
+ ;CHECK lqd $3, 0($3)
+ %val = load <4 x float>* undef
+ ret <4 x float> %val
+}
More information about the llvm-commits
mailing list