Skip to content

Commit 4378b40

Browse files
committed
fixup! arcv: apex: Add LTO testsuite for APEX intrinsics.
Signed-off-by: Luis Silva <[email protected]>
1 parent b2fc1fa commit 4378b40

File tree

8 files changed

+15
-19
lines changed

8 files changed

+15
-19
lines changed

gcc/testsuite/gcc.target/riscv/apex/arcv-apex-lto-err1_0.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ extern int use_conflict (int, int);
99
int
1010
main (void)
1111
{
12-
return use_conflict (5, 10);
12+
return apex_conflict (1, 2) + use_conflict (5, 10);
1313
}
14+
15+
/* { dg-lto-warning "APEX builtin 'apex_conflict' already registered with different opcode: 0x32 vs 0x33" "" { target *-*-* } 4 } */
16+
/* { dg-lto-error "APEX builtin 'apex_conflict' has conflicting definitions across compilation units" "" { target *-*-* } 4 } */

gcc/testsuite/gcc.target/riscv/apex/arcv-apex-lto-err1_1.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@ use_conflict (int a, int b)
77
{
88
return apex_conflict (a, b);
99
}
10-
11-
/* { dg-lto-warning "APEX builtin 'apex_conflict' already registered with different opcode: 0x32 vs 0x33" "" { target *-*-* } 2 } */
12-
/* { dg-lto-error "APEX builtin 'apex_conflict' has conflicting definitions across compilation units" "" { target *-*-* } 2 } */

gcc/testsuite/gcc.target/riscv/apex/arcv-apex-lto-err2_0.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ extern int use_insn_mismatch (int, int);
1010
int
1111
main (void)
1212
{
13-
return use_insn_mismatch (5, 10);
13+
return apex_insn_mismatch (1, 2) + use_insn_mismatch (5, 10);
1414
}
1515

16+
/* { dg-lto-warning "APEX builtin 'apex_insn_mismatch' already registered with different instruction name: 'insn_a' vs 'insn_b'" "" { target *-*-* } 5 } */
17+
/* { dg-lto-error "APEX builtin 'apex_insn_mismatch' has conflicting definitions across compilation units" "" { target *-*-* } 5 } */

gcc/testsuite/gcc.target/riscv/apex/arcv-apex-lto-err2_1.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@ use_insn_mismatch (int a, int b)
77
{
88
return apex_insn_mismatch (a, b);
99
}
10-
11-
/* { dg-lto-warning "APEX builtin 'apex_insn_mismatch' already registered with different instruction name: 'insn_a' vs 'insn_b'" "" { target *-*-* } 2 } */
12-
/* { dg-lto-error "APEX builtin 'apex_insn_mismatch' has conflicting definitions across compilation units" "" { target *-*-* } 2 } */
13-

gcc/testsuite/gcc.target/riscv/apex/arcv-apex-lto-err3_0.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ extern int use_format_mismatch (int);
1010
int
1111
main (void)
1212
{
13-
return use_format_mismatch (5);
13+
return apex_format_mismatch (1, 2) + use_format_mismatch (5);
1414
}
1515

16+
/* { dg-lto-warning "APEX builtin 'apex_format_mismatch' already registered with different instruction formats: 0xe2 vs 0xe8" "" { target *-*-* } 5 } */
17+
/* { dg-lto-error "APEX builtin 'apex_format_mismatch' has conflicting definitions across compilation units" "" { target *-*-* } 5 } */

gcc/testsuite/gcc.target/riscv/apex/arcv-apex-lto-err3_1.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,3 @@ use_format_mismatch (int a)
77
{
88
return apex_format_mismatch (a, 10);
99
}
10-
11-
/* { dg-lto-warning "APEX builtin 'apex_format_mismatch' already registered with different instruction formats: 0xe2 vs 0xe8" "" { target *-*-* } 2 } */
12-
/* { dg-lto-error "APEX builtin 'apex_format_mismatch' has conflicting definitions across compilation units" "" { target *-*-* } 2 } */

gcc/testsuite/gcc.target/riscv/apex/arcv-apex-lto-err4_0.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ extern int use_multi_mismatch (int);
1010
int
1111
main (void)
1212
{
13-
return use_multi_mismatch (5);
13+
return apex_multi_mismatch (1, 2) + use_multi_mismatch (5);
1414
}
1515

16+
/* { dg-lto-warning "APEX builtin 'apex_multi_mismatch' already registered with different instruction name: 'insn_original' vs 'insn_different'" "" { target *-*-* } 5 } */
17+
/* { dg-lto-warning "APEX builtin 'apex_multi_mismatch' already registered with different opcode: 0x14 vs 0x15" "" { target *-*-* } 5 } */
18+
/* { dg-lto-warning "APEX builtin 'apex_multi_mismatch' already registered with different instruction formats: 0xe1 vs 0xe2" "" { target *-*-* } 5 } */
19+
/* { dg-lto-error "APEX builtin 'apex_multi_mismatch' has conflicting definitions across compilation units" "" { target *-*-* } 5 } */

gcc/testsuite/gcc.target/riscv/apex/arcv-apex-lto-err4_1.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,3 @@ use_multi_mismatch (int a)
77
{
88
return apex_multi_mismatch (a, 10);
99
}
10-
11-
/* { dg-lto-warning "APEX builtin 'apex_multi_mismatch' already registered with different instruction name: 'insn_original' vs 'insn_different'" "" { target *-*-* } 2 } */
12-
/* { dg-lto-warning "APEX builtin 'apex_multi_mismatch' already registered with different opcode: 0x14 vs 0x15" "" { target *-*-* } 2 } */
13-
/* { dg-lto-warning "APEX builtin 'apex_multi_mismatch' already registered with different instruction formats: 0xe1 vs 0xe2" "" { target *-*-* } 2 } */
14-
/* { dg-lto-error "APEX builtin 'apex_multi_mismatch' has conflicting definitions across compilation units" "" { target *-*-* } 2 } */

0 commit comments

Comments
 (0)