[llvm-commits] Patch for handling multiple values in ExpandIntegerOperand
sanjiv gupta
sanjiv.gupta at microchip.com
Sun Oct 19 08:41:19 PDT 2008
On Sat, 2008-10-18 at 18:23 +0200, Duncan Sands wrote:
> Hi,
>
> - assert(Res.getValueType() == N->getValueType(0) && N->getNumValues() == 1 &&
> - "Invalid operand expansion");
> + // The result node should return same or more values as the original node.
> + assert (Res.getNode()->getNumValues() >= N->getNumValues());
>
> I'd rather use ReplaceAllUsesWith and require the number
> of values to be the same. This is more work of course,
> since it means fixing up several places.
>
> Ciao,
>
> Duncan.
That's actually same as using ReplaceNodeWith.
What's the best way to find out all places that need fixing up? Should I
just look into the Expand* functions in all targets and find out what
needs to use MergeValues? Or should I just make this change in
ExpandIntegerOperand() and let target owners take care of it. What all
targets are currently using -enable-legalize-types? I guess only X86.
- Sanjiv
More information about the llvm-commits
mailing list