https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82662
Bug ID: 82662
Summary: ifcvt is not performed on double-word compare
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: ubizjak at gmail dot com
Target Milestone: ---
Following testcase:
int foo (__int128 a, __int128 b)
{
return a < b;
}
compiles to:
movq %rsi, %r10
cmpq %rdx, %rdi
movl $1, %eax
sbbq %rcx, %r10
jl .L2
xorl %eax, %eax
.L2:
rep ret
For some reason ifcvt is not performed, although the candidate is detected in
ce1 pass:
8: NOTE_INSN_FUNCTION_BEG
11: r95:SI=0x1
12: {flags:CCGZ=cmp(r89:TI,r93:TI);clobber scratch;}
REG_DEAD r93:TI
REG_DEAD r89:TI
13: pc={(flags:CCGZ<0)?L15:pc}
REG_DEAD flags:CCGZ
REG_BR_PROB 536870912
23: NOTE_INSN_BASIC_BLOCK 3
14: r95:SI=0
15: L15:
24: NOTE_INSN_BASIC_BLOCK 4
20: ax:SI=r95:SI
REG_DEAD r95:SI
21: use ax:SI
IF-THEN-JOIN block found, pass 1, test 2, then 3, join 4
========== no more changes
1 possible IF blocks searched.
0 IF blocks converted.
0 true changes made.