[PATCH 1/4] [RISC-V] prefer Zicond primitive semantics to SFB

2023-11-27 Thread Fei Gao
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

Re: [PATCH 1/4] [RISC-V] prefer Zicond primitive semantics to SFB

2023-11-27 Thread Kito Cheng
Personally I don't like to play with the pattern order to tweak the code gen since it kinda introduces implicit relation/rule here, but I guess the only way to prevent that is to duplicate the pattern for SFB again, which is not an ideal solution... Anyway, it's obviously a better code gen, so LGT

Re: [PATCH 1/4] [RISC-V] prefer Zicond primitive semantics to SFB

2023-11-27 Thread Jeff Law
On 11/27/23 20:09, Kito Cheng wrote: Personally I don't like to play with the pattern order to tweak the code gen since it kinda introduces implicit relation/rule here, but I guess the only way to prevent that is to duplicate the pattern for SFB again, which is not an ideal solution... I won'

Re: Re: [PATCH 1/4] [RISC-V] prefer Zicond primitive semantics to SFB

2023-12-03 Thread Fei Gao
Committed.  Thanks Kito and Jeff. BR Fei On 2023-11-28 13:03  Jeff Law wrote: > > > >On 11/27/23 20:09, Kito Cheng wrote: >> Personally I don't like to play with the pattern order to tweak the >> code gen since it kinda introduces implicit relation/rule here, but I >> guess the only way to preve