diff options
author | Fei Gao <gaofei@eswincomputing.com> | 2023-11-28 02:32:24 +0000 |
---|---|---|
committer | Fei Gao <gaofei@eswincomputing.com> | 2023-12-04 06:55:47 +0000 |
commit | fc98a41c8def1cab4f9b8359be84e8623eab88e2 (patch) | |
tree | 8eaf60dfa1578c71be3bbf283f1714098f29f043 /gcc/function.h | |
parent | ba94969bad24d57895b02cc2d4663462f8fb5bc5 (diff) | |
download | gcc-fc98a41c8def1cab4f9b8359be84e8623eab88e2.zip gcc-fc98a41c8def1cab4f9b8359be84e8623eab88e2.tar.gz gcc-fc98a41c8def1cab4f9b8359be84e8623eab88e2.tar.bz2 |
prefer Zicond primitive semantics to SFB
Move Zicond md files ahead of SFB to recognize Zicond first.
Take the following case for example.
CFLAGS: -mtune=sifive-7-series -march=rv64gc_zicond -mabi=lp64d
long primitiveSemantics_00(long a, long b) { return a == 0 ? 0 : b; }
before patch:
primitiveSemantics_00:
bne a0,zero,1f # movcc
mv a1,zero
1:
mv a0,a1
ret
after patch:
primitiveSemantics_00:
czero.eqz a0,a1,a0
ret
Co-authored-by: Xiao Zeng<zengxiao@eswincomputing.com>
gcc/ChangeLog:
* config/riscv/riscv.md (*mov<GPR:mode><X:mode>cc):move to sfb.md
* config/riscv/sfb.md: New file.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/zicond-sfb-primitiveSemantics.c: New test.
Diffstat (limited to 'gcc/function.h')
0 files changed, 0 insertions, 0 deletions