On 6/4/25 6:37 PM, Palmer Dabbelt wrote:
On Wed, 04 Jun 2025 17:25:20 PDT (-0700), Jeff Law wrote:
This patch has a minor improvement to if-converted sequences based on
observations I found while evaluating another patch from Shreya to
handle more cases with zicond insns.

Specifically there is a smaller/faster way than zicond to generate a
-1,1 result when the condition is testing the sign bit.

So let's consider these two tests (rv64):

long foo1 (long c, long a) { return c >= 0 ? 1 : -1; }
long foo2 (long c, long a) { return c < 0 ? -1 : 1; }

"a" is unnecessary?  Or am I just asleep?

(it's in the testcases too)
No it's not necessary. Just didn't remove it when I derived it from another issue I'm looking at.


Jeff

Reply via email to