forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alpha: Introduce target specific store_data_bypass_p function [PR105209]
This patch introduces alpha-specific version of store_data_bypass_p that ignores TRAP_IF that would result in assertion failure (and internal compiler error) in the generic store_data_bypass_p function. While at it, also remove ev4_ist_c reservation, store_data_bypass_p can handle the patterns with multiple sets since some time ago. 2022-06-17 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/105209 * config/alpha/alpha-protos.h (alpha_store_data_bypass_p): New. * config/alpha/alpha.cc (alpha_store_data_bypass_p): New function. (alpha_store_data_bypass_p_1): Ditto. * config/alpha/ev4.md: Use alpha_store_data_bypass_p instead of generic store_data_bypass_p. (ev4_ist_c): Remove insn reservation. gcc/testsuite/ChangeLog: PR target/105209 * gcc.target/alpha/pr105209.c: New test.
- Loading branch information
Showing
4 changed files
with
101 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-O2 -ftrapv -mcpu=ev4" } */ | ||
|
||
typedef struct tnode_t { | ||
struct tnode_t *tn_left, *tn_right; | ||
int v_quad; | ||
} tnode_t; | ||
|
||
int constant_addr(const tnode_t *, long *); | ||
int constant_addr(const tnode_t *tn, long *offsp) | ||
{ | ||
long offs1 = 0, offs2 = 0; | ||
|
||
if (tn->v_quad > 0) { | ||
offs1 = tn->v_quad; | ||
return 0; | ||
} else if (tn->v_quad > -1) { | ||
offs2 = tn->tn_right->v_quad; | ||
if (!constant_addr(tn->tn_left, &offs1)) | ||
return 0; | ||
} else { | ||
return 0; | ||
} | ||
*offsp = offs1 + offs2; | ||
return 1; | ||
} |