https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108004
Bug ID: 108004
Summary: x-form logical operations with dot instructions are
not emitted.
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: guihaoc at gcc dot gnu.org
Target Milestone: ---
//test case
int foo (int a, int b, int c, int d)
{
return (a & b) > 0 ? c : d;
}
//assemble on P9
and 3,3,4
cmpwi 0,3,0
isel 5,5,6,1
extsw 3,5
The "and" and "cmpwi" can be optimized to "and." instruction. The same as "or"
and "xor".