On 7/19/24 2:54 AM, demin.han wrote:
There are still some cases which can't utilize vx or vf after
last_combine pass.
1. integer comparison when imm isn't in range of [-16, 15]
2. float imm is 0.0
3. DI or DF mode under RV32
This patch fix above mentioned issues.
Tested on RV32 and RV64.
S
> I have a test.
> The backend can't see -0.0 and It becomes 0.0 when translate to gimple.
I don't think it should except when specifying -ffast-math or similar.
But we don't have a shortcut to load a negative zero, just the positive
one.
--
Regards
Robin
> -(match_operand:V_VLSF 3 "register_operand")]))]
> +(match_operand:V_VLSF 3 "nonmemory_operand")]))]
Even though the integer compares have nonmemory operand here their respective
insn patterns don't (but constrain properly).
I guess what's happening with register operand and a c
> -Original Message-
> From: Li, Pan2
> Sent: 2024年7月19日 18:33
> To: Demin Han ; gcc-patches@gcc.gnu.org
> Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com;
> rdapp@gmail.com
> Subject: RE: [PATCH v2] RISC-V: More support of vx and vf for
> + TEST_COND_IMM_FLOAT (T, >, 0.0, _gt)
> \
> + TEST_COND_IMM_FLOAT (T, <, 0.0, _lt)
> \
> + TEST_COND_IMM_FLOAT (T, >=, 0.0, _ge)
> \
> + TEST_COND_IMM_FLOAT (T, <=, 0.0, _le)