On Tue, Feb 06, 2018 at 10:36:41AM -0600, Peter Bergner wrote: > On 2/6/18 10:20 AM, David Edelsohn wrote: > > Do the gen_XXXdi3 calls work if you use SDI iterator instead of GPR > > iterator, as Segher suggested? > > Well it works _if_ we use the first patch that changes the gen_* > patterns. If we go this route, I agree we should use the SDI > iterator instead of GPR. > > > > Otherwise, this seems like the more correct approach to not conflict > > with the semantics expected by the patterns. > > It's up to you and Segher which patch you think is cleaner/more preferable. > The benefit of the gen_* patch is that if any code added in the future > calls those gen_* routines, then they'll work with no changes. Otherwise, > the new code would have to do something similar to this latest patch. > Kind of a "six of one, half dozen of the other" sort of thing. > I'm fine either way.
Yes, if you make [u]divdi3 work for SDI (i.e. also for -m32) we'll never have to special-case it again (also [u]moddi3?) But this then also will be used by expand, when generation a DImode divide. Does it generate code at least as good as what the generic code generates? It probably will, but check please. Segher