[llvm-commits] Patch for handling multiple values in ExpandIntegerOperand

Duncan Sands baldrick at free.fr
Fri Oct 31 02:52:32 PDT 2008


> Looks like some target independent code also requires that the number of
> values can't be same. For example: TRUNC:i8 (add:i16) gets replaced by
> the first value of adde:(i8, flag) ignoring the flag.

these routines are defined to return one value.  In the code in question
that value needs to replace one value of N.  If N has more than one value,
how do you know which one to replace?

> So the patch I submitted  is quite generic and only extends the
> functionally to handle the case where the original node had multiple
> values. Our target needs this since we are replacing loads, and a load
> has multiple values. Do you think the patch is unsafe?

Yes, because it assumes that you want to replace the first values of N.
I think it makes more sense to change everything (include the target
independent routines) to return nodes rather than values, and have these
new nodes entirely replace N.



More information about the llvm-commits mailing list