"Ulrich Weigand" <uweig...@de.ibm.com> writes: > Richard Sandiford wrote: >> "Ulrich Weigand" <uweig...@de.ibm.com> writes: >> > The problem is not DImode LABEL_REFs, but rather VOIDmode LABEL_REFs when >> > matched against a match_operand:DI. >> >> It'd be good to fix this in a more direct way though, rather than >> hack around it. It's possible that the trick will stop working >> if genrecog.c gets smarter. >> >> When do label_refs have VOIDmode? Is this an m31-ism? > > No, this seems to be a cross-platform issue. For one, RTX in .md files > pretty much consistently uses (label_ref ...) without a mode. This means > that any LABEL_REFs generated from .md file expanders or splitters will > use VOIDmode. > > For LABEL_REFs generated via explicit gen_rtx_LABEL_REF, usage seems to > be mixed between using VOIDmode and Pmode in target C++ files. Common > code does seem to be using always Pmode, as far as I can see. > > Are LABEL_REFs in fact supposed to always have Pmode?
Yeah, I think so, or at least always be Pmode or ptr_mode. It sounds from what you say that reality doesn't match though. We should probably fix the remaining gen_rtx_LABEL_REF calls and get the expanders to automatically add modes where needed, but that clearly isn't stage 3 material. Thanks, Richard