[Bug target/93768] New: Use vpternlog for composite logical operations
rth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Feb 16 19:38:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93768
Bug ID: 93768
Summary: Use vpternlog for composite logical operations
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: rth at gcc dot gnu.org
Target Milestone: ---
We should pattern-match multiple logical operations
into the ternary logical operator. While there are
lots of obscure combinations available, probably the
most useful are
Two-input inverted logicals:
0x11 ~(B|C)
0x77 ~(B&C)
0x99 ~(B^C)
0xbb C|~B
0xdd B|~C
Three-input simple logicals:
0x80 A&B&C
0x96 A^B^C
0xfe A|B|C
Multiple alternatives of the ?: operation, which allows
the memory-capable operand, C, in various positions, and
allows the input-output operand, A, in various positions:
0xe2 B?A:C
0xe4 C?A:B
0xb8 B?C:A
0xd8 C?B:A
0xca A?B:C
0xac A?C:B
More information about the Gcc-bugs
mailing list