]> gcc.gnu.org Git - gcc.git/commitdiff
rtl-ssa: Fix reg_raw_mode thinko [PR98347]
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 17 Dec 2020 19:31:02 +0000 (19:31 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Thu, 17 Dec 2020 19:31:02 +0000 (19:31 +0000)
I'd used reg_raw_mode[regno] for general registers, even though
the array is only valid for hard registers.  This patch uses
regno_reg_rtx instead.

gcc/
PR rtl-optimization/98347
* rtl-ssa/access-utils.h (full_register): Use regno_reg_rtx
instead of reg_raw_mode.

gcc/rtl-ssa/access-utils.h

index b200e3416d766296073847d294f3931f4e1dd475..634f99bad887eda1f6bf2c1c37b36854810feb33 100644 (file)
@@ -23,7 +23,7 @@ namespace rtl_ssa {
 inline resource_info
 full_register (unsigned int regno)
 {
-  return { reg_raw_mode[regno], regno };
+  return { GET_MODE (regno_reg_rtx[regno]), regno };
 }
 
 // Return true if sorted array ACCESSES includes an access to hard registers.
This page took 0.067209 seconds and 5 git commands to generate.