[LLVMdev] indirectbr implementation for Alpha backend

Giang Hoang ghoang84 at gmail.com
Thu Mar 31 07:22:03 PDT 2011


Hi,

I encountered an error while trying to use the indirectbr instruction with
Alpha backend (current build).  Here's part of the code sequence that I
tried to compile:

bb1:
  %1 = load i32* %i, align 4
  %2 = add nsw i32 %1, 1
  store i32 %2, i32* %i, align 4
  indirectbr i8* blockaddress(@main, %bb1), [ label %bb1 ]
  br label %return

This compiles correctly when I use the X86 or PPC backend, but results in
the following error with Alpha backend:

LLVM ERROR: Cannot select: 0x95a0490: i64 = BlockAddress<@main, %bb1> [ID=3]

I also found the following line commented out in the file
lib/Target/Alpha/AlphaISelLowering.cpp:

//  setOperationAction(ISD::BRIND,        MVT::Other,   Expand);

My guess is that indirectbr is not implemented for Alpha.  If that's the
case, where do I need to make changes to implement this instruction?

Thank you,

Giang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110331/982a58f5/attachment.html>


More information about the llvm-dev mailing list