Hi,<div><br></div><div>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:</div><div><br></div><div>bb1:</div>
<div><div>  %1 = load i32* %i, align 4</div><div>  %2 = add nsw i32 %1, 1</div><div>  store<span class="Apple-tab-span" style="white-space:pre">  </span>i32 %2,<span class="Apple-tab-span" style="white-space:pre">     </span>i32* %i, align 4</div>
<div>  indirectbr i8* blockaddress(@main, %bb1), [ label %bb1 ]</div><div>  br label %return</div></div><div><br></div><div>This compiles correctly when I use the X86 or PPC backend, but results in the following error with Alpha backend:</div>
<div><br></div><div>LLVM ERROR: Cannot select: 0x95a0490: i64 = BlockAddress<@main, %bb1> [ID=3]</div><div><br></div><div>I also found the following line commented out in the file lib/Target/Alpha/AlphaISelLowering.cpp:</div>
<div><br></div><div>//  setOperationAction(ISD::BRIND,        MVT::Other,   Expand); </div><div><br></div><div>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?</div>
<div><br></div><div>Thank you,</div><div><br></div><div>Giang</div><div><br></div><div><br></div><div><br></div><div>  </div>