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). 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. - Sanjiv
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
On Sep 1, 2008, at 10:50 AM, sanjiv gupta 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). > > 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.We generally do not extend the IR just for convenience. Adding something like BUILD_TRIPLET is too arbitrary. It goes against the LLVM philosophy. Sorry. Evan> > > - Sanjiv > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Seemingly Similar Threads
- Potential bug in SelectionDAGLegalize::ConvertNodeToLibcall()?
- Potential bug in SelectionDAGLegalize::ConvertNodeToLibcall()?
- Potential bug in SelectionDAGLegalize::ConvertNodeToLibcall()?
- [LLVMdev] Problems expanding fcmp to a libcall
- Glue to connect two nodes in LLVM backend