[LLVMdev] ADDE on HW that doesn't have flags?
andrewl at lenharth.org
Mon Oct 27 09:07:39 PDT 2008
On Mon, Oct 27, 2008 at 10:11 AM, Daniel M Gessel <gessel at apple.com> wrote:
> The language I'm targeting doesn't have flags; I'd like to implement
> ADDE as a macro or psuedo-instruction that takes 3 parameters and
> returns 2.
> In my InstrInfo.td file, tablegen complains if I try to define
> multiple return values; adde is defined in TargetSelectionDAG.td to be
> a binary op that takes an extra flag in and sends an extra flag out.
> I tried to custom lower ADDE (by calling setOperationAction with
> ISD::ADDE) but it didn't seem to register and still bailed when trying
> to expand adde, instead of calling my LowerOperation.
ADDE should only be generated if you specify ADDC as legal. If ADDC
is illegal, larger integer arith will be lowered to add and cmp
sequences rather than addc adde sequences.
More information about the llvm-dev