[PATCH] D29872: Do not legalize large add with addc/adde, introduce addcarry and do it with uaddo/addcarry
Amaury SECHET via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 20 11:34:22 PDT 2017
deadalnix added inline comments.
Comment at: lib/Target/X86/X86ISelLowering.cpp:23103
+ // Let legalize expand this if it isn't a legal type yet.
+ if (!DAG.getTargetLoweringInfo().isTypeLegal(VT))
> deadalnix wrote:
> > zvi wrote:
> > > I know this also appears at the top of LowerADDC_ADDE_SUBC_SUBE, but why it this check needed?
> > Because in that case, the backend wants to run some extra legalization code before coming back there.
> At the time this code runs, there should not be any illegal types present in the DAG.
> So i am asking why is there a need to check for illegal types?
I'm not sure what the X86 backend is doing, but this is clearly happening looking at the -debug output of llc.
More information about the llvm-commits