[LLVMdev] BUILD_TRIPLET node.
Eli Friedman
eli.friedman at gmail.com
Mon Sep 1 14:02:41 PDT 2008
On Mon, Sep 1, 2008 at 10:50 AM, sanjiv gupta
<sanjiv.gupta at microchip.com> wrote:
> Currently I can use a BUILD_PAIR to make a pair of two arbitrary values
> to a desired result value. For example, I can make i8,build_pair =
> (i8, i8) or i16,build_pair = (i1, i8).
I don't think those are legal; from SelectionDAGNodes.h:
// BUILD_PAIR - This is the opposite of EXTRACT_ELEMENT in some ways. Given
// two values of the same integer value type, this produces a value twice as
// big. Like EXTRACT_ELEMENT, this can only be used before legalization.
> This is turning out to very handy when I replace nodes during the
> expansion/legalization of types for my target.
>
> I was just wondering if we could go one more step further and create a
> BUILD_TRIPLET node which can contain three incoming operands instead of
> just two. I know that I can do that with two build_pairs , but a
> build_triplet will make my code cleaner and easy to follow.
Maybe MERGE_VALUES would be more suited to what you're doing?
-Eli
More information about the llvm-dev
mailing list