Ken Dyck
2010-Feb-09 14:19 UTC
[LLVMdev] 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 selection. Is there a standard trick to work around this problem? -Ken
Tilmann Scheller
2010-Feb-09 15:24 UTC
[LLVMdev] Illegal operations generated in ShrinkDemandedOps()
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
Seemingly Similar Threads
- [LLVMdev] How to prevent LLVM from undoing a custom lowering
- loop searching the id corresponding to the given index (timestamp)
- [LLVMdev] [cfe-dev] Developer meeting videos up
- [LLVMdev] Contribute a new precise pointer analysis to LLVM
- [LLVMdev] Extracting libmachine from libcodegen (bug 1121)