[LLVMdev] legalization of truncating stores in LegalizeDAG.cpp

Hatanaka, Akira ahatanaka at mips.com
Thu May 31 17:27:09 PDT 2012


In LegalizeDAG.cpp, truncating stores are custom-lowered in line 1314-1317:


1314         case TargetLowering::Custom:
1315           ReplaceNode(SDValue(Node, 0),
1316                       TLI.LowerOperation(SDValue(Node, 0), DAG));
1317           break;


Is there a reason it doesn't check whether the SDValue returned from
TargetLowering::LowerOperation is null before it replaces the original node with the returned node? The return value is checked everywhere else TLI.LowerOperation is called (line 937, for example).

937         Tmp1 = TLI.LowerOperation(Tmp3, DAG);
938         if (Tmp1.getNode()) {
939           Tmp3 = Tmp1;
940           Tmp4 = Tmp1.getValue(1);
941         }
942         break;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120601/f10d508d/attachment.html>


More information about the llvm-dev mailing list