Illegal operations generated in ShrinkDemandedOps()

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

Is there a standard trick to work around this problem?


Hi Ken,