[aarch64-port-dev ] RFR: 8151661: Performance regression on Solaris-SPARC in 9-b103
Andrew Haley
aph at redhat.com
Wed Jun 8 16:51:45 UTC 2016
On 08/06/16 17:27, Vladimir Kozlov wrote:
> I think this statement is not correct as SPARC problem shows.
I accept that, but I still think it's a bug. Never mind, in the
spirit of co-operation, let's press on... :-)
> New branch instructions could be introduced on new CPU (cbcond in this
> case) and it usage will be guarded by predicate in .ad file. In such
> case predicates for long and short branches will be different.
>
> I also understand your case when you use predicate to check condition
> code. Yes, in such case you have to match predicates. But the same
> result you can get with specialized cmpOp operands. And specialized immI
> (for op2) when you check is_power_of_2().
OK, I'll go for that. So, rather than what I have now:
instruct cmpL_branch_bit(cmpOp cmp, iRegL op1, immL op2, immL0 op3, label labl) %{
match(If cmp (CmpL (AndL op1 op2) op3));
predicate((n->in(1)->as_Bool()->_test._test == BoolTest::ne
|| n->in(1)->as_Bool()->_test._test == BoolTest::eq)
&& is_power_of_2(n->in(2)->in(1)->in(2)->get_long()));
I'd have to find some way to express the predicate as a pattern.
I know how to do the is_power_of_2 part as an operand in the pattern.
I'm not sure how to express the idea that this must only match an EQ
or NE cmpOp without using a predicate to distinguish.
Andrew.
More information about the aarch64-port-dev
mailing list