Fix parameter map computation in ipa-modref
authorJan Hubicka <jh@suse.cz>
Sat, 10 Oct 2020 22:07:11 +0000 (00:07 +0200)
committerJan Hubicka <jh@suse.cz>
Sat, 10 Oct 2020 22:07:11 +0000 (00:07 +0200)
* ipa-modref.c (modref_transform): Fix parameter map computation.

gcc/ipa-modref.c

index 0fbb943e57c7fd27a203b8c7d9f4ff60fc861d17..dd59e804c0f08cfb7f24a8d1913c0a19c6aedad4 100644 (file)
@@ -1379,7 +1379,7 @@ modref_transform (struct cgraph_node *node)
     {
       int idx = node->clone.param_adjustments->get_original_index (i);
       if (idx >= 0)
-       map[i] = idx;
+       map[idx] = i;
     }
   remap_arguments (&map, r->loads);
   remap_arguments (&map, r->stores);