[LLVMdev] Illegal operations generated in ShrinkDemandedOps()
Tilmann Scheller
tilmann.scheller at googlemail.com
Tue Feb 9 07:24:15 PST 2010
Hi Ken,
On Tue, Feb 9, 2010 at 3:19 PM, Ken Dyck <Ken.Dyck at onsemi.com> wrote:
> The architecture that I'm targeting with an LLVM back end has SRA
> instructions for all its data sizes, but is missing SRL instructions for
> some data sizes.
>
> I'm having trouble with the SelectionDAGISel::ShrinkDemandedOps() pass.
> Although it runs after the DAG has been legalized, it replaces legal
> SRAs with illegal SRLs, which results in failures in instruction
> selection.
>
> Is there a standard trick to work around this problem?
I ran into the same issue with my backend (which doesn't have a native
SRL instruction) and opened http://llvm.org/bugs/show_bug.cgi?id=5374
some time ago. I've been using the patch from the PR for a few months
now without any problems.
Cheers,
Tilmann
More information about the llvm-dev
mailing list