[LLVMdev] legalization of truncating stores in LegalizeDAG.cpp
Duncan Sands
baldrick at free.fr
Fri Jun 1 00:59:53 PDT 2012
Hi Akira,
On 01/06/12 02:27, Hatanaka, Akira wrote:
> 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;
probably it's just an oversight, because no backend needed it. LegalizeDAG is
unfortunately full of code like this.
Ciao, Duncan.
More information about the llvm-dev
mailing list