[Bug target/106536] New: P9: gcc does not detect setb pattern
jens.seifert at de dot ibm.com
gcc-bugzilla@gcc.gnu.org
Fri Aug 5 10:17:54 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106536
Bug ID: 106536
Summary: P9: gcc does not detect setb pattern
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: jens.seifert at de dot ibm.com
Target Milestone: ---
int compare2(unsigned long long a, unsigned long long b)
{
return (a > b ? 1 : (a < b ? -1 : 0));
}
Output:
_Z8compare2yy:
cmpld 0,3,4
bgt 0,.L5
mfcr 3,128
rlwinm 3,3,1,1
neg 3,3
blr
.L5:
li 3,1
blr
.long 0
.byte 0,9,0,0,0,0,0,0
clang generates:
_Z8compare2yy: # @_Z8compare2yy
cmpld 3, 4
setb 3, 0
extsw 3, 3
blr
.long 0
.quad 0
More information about the Gcc-bugs
mailing list