diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/riscv/xor-synthesis-3.c')
-rw-r--r-- | gcc/testsuite/gcc.target/riscv/xor-synthesis-3.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/riscv/xor-synthesis-3.c b/gcc/testsuite/gcc.target/riscv/xor-synthesis-3.c new file mode 100644 index 0000000..765904b --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/xor-synthesis-3.c @@ -0,0 +1,8 @@ +/* { dg-do compile { target { rv64 } } } */ +/* { dg-options "-march=rv64gb -mabi=lp64d" } */ + +unsigned long foo(unsigned long src) { return src ^ 0x8c00000000000001; } + +/* { dg-final { scan-assembler-times "\\srori\t" 2 } } */ +/* { dg-final { scan-assembler-times "\\sxori\t" 1 } } */ + |