[LLVMdev] Question regarding ReplaceValueWith and ReplaceNodeResults

Pranav Bhandarkar
Sun, 02 Sep 2012 07:10:01 -0000

Hi Duncan,

> as well as what Eli said, ReplaceNodeResults requires (IIRC) the new node
to
> have the same type as the old node, which doesn't seem to be the case
> here.

Are you sure ? I see ReplaceNodeResults being called from functions such as
CustomWidenLowerNode and CustomLowerNode.
In the former, we are clearly expecting a change in type, aren't we? Even in
the latter, ReplaceNodeResults  is called only when the type of the result
is not legal.
Otherwise, the latter calls LowerOperationWrapper.

Thanks,
Pranav
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation