This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA[powerpc]: patch to fix PR79916


On Fri, 13 Apr 2018, Jakub Jelinek wrote:
> 	  if (reg_renumber[regno] >= 0)
> 	    regno = reg_renumber[regno];
> 	  else
> 	    regno = cl == NO_REGS ? -1 : ira_class_hard_regs[cl][1];
> or
> 	  regno = (reg_renumber[regno] >= 0
> 		   ? reg_renumber[regno]
> 		   : cl == NO_REGS ? -1 : ira_class_hard_regs[cl][1]);
> is better, the latter is perhaps more compact.

Here's another compact variant:

 	  regno = reg_renumber[regno];
 	  if (regno < 0)
 	    regno = cl == NO_REGS ? -1 : ira_class_hard_regs[cl][1];

Alexander


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]