https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108784
Arseny Solokha <asolokha at gmx dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|aarch64-linux-gnu |aarch64-linux-gnu,
| |x86_64-unknown-linux-gnu
Summary|'-fcompare-debug' failure |'-fcompare-debug' failure
|(length) w/ -O1 |(length) w/ --param
|-fharden-conditional-branch |ira-simple-lra-insn-thresho
|es -funroll-all-loops |ld=1
|--param |
|ira-simple-lra-insn-thresho |
|ld=1 |
--- Comment #1 from Arseny Solokha <asolokha at gmx dot com> ---
(In reply to Arseny Solokha from comment #0)
> I believe it has nothing to do w/
> -fharden-conditional-branches, as there are many testcases that fail w/ that
> omitted.
Like the following one (though I get hundreds of them each day starting from
that snapshot):
int
foo (int x)
{
int i, a = 0;
x <<= !!x;
for (i = 0; i < 7; ++i)
{
int i;
for (i = 0; i < 12; ++i)
{
++x;
a += x + i;
}
}
return x;
}
% gcc-13 -O1 -fcompare-debug --param ira-simple-lra-insn-threshold=1 -c
hqgybh5a.c
gcc-13: error: hqgybh5a.c: '-fcompare-debug' failure (length)
--- hqgybh5a.c.gkd 2023-02-23 21:10:57.181155878 +0700
+++ hqgybh5a.gk.c.gkd 2023-02-23 21:10:57.219153362 +0700
@@ -5,29 +5,36 @@
(note # 0 0 NOTE_INSN_DELETED)
(note # 0 0 [bb 2] NOTE_INSN_BASIC_BLOCK)
(note # 0 0 NOTE_INSN_PROLOGUE_END)
+(insn # 0 0 2 (set (reg/v:SI 0 ax [orig:86 x ] [86])
+ (reg:SI 5 di [90])) "hqgybh5a.c":3:1# {*movsi_internal}
+ (nil))
(note # 0 0 NOTE_INSN_FUNCTION_BEG)
(insn # 0 0 2 (set (reg:CCZ 17 flags)
- (compare:CCZ (reg/v:SI 5 di [orig:86 x ] [86])
+ (compare:CCZ (reg:SI 5 di [orig:86 x ] [86])
(const_int 0 [0]))) "hqgybh5a.c":6:9# {*cmpsi_ccno_1}
- (nil))
+ (expr_list:REG_DEAD (reg:SI 5 di [orig:86 x ] [86])
+ (nil)))
(insn # 0 0 2 (set (reg:QI 2 cx [88])
(ne:QI (reg:CCZ 17 flags)
(const_int 0 [0]))) "hqgybh5a.c":6:9# {*setcc_qi}
(expr_list:REG_DEAD (reg:CCZ 17 flags)
(nil)))
(insn # 0 0 2 (parallel [
- (set (reg/v:SI 5 di [orig:84 x ] [84])
- (ashift:SI (reg/v:SI 5 di [orig:86 x ] [86])
+ (set (reg/v:SI 0 ax [orig:84 x ] [84])
+ (ashift:SI (reg/v:SI 0 ax [orig:86 x ] [86])
(reg:QI 2 cx [88])))
(clobber (reg:CC 17 flags))
]) "hqgybh5a.c":6:5# {*ashlsi3_1}
(expr_list:REG_DEAD (reg:QI 2 cx [88])
(expr_list:REG_UNUSED (reg:CC 17 flags)
(nil))))
-(insn # 0 0 2 (set (reg:SI 0 ax [orig:89 x ] [89])
- (plus:SI (reg/v:SI 5 di [orig:84 x ] [84])
- (const_int 84 [0x54]))) "hqgybh5a.c":19:10 discrim 1# {*leasi}
- (expr_list:REG_DEAD (reg/v:SI 5 di [orig:84 x ] [84])
+(insn # 0 0 2 (parallel [
+ (set (reg:SI 0 ax [orig:89 x ] [89])
+ (plus:SI (reg/v:SI 0 ax [orig:84 x ] [84])
+ (const_int 84 [0x54])))
+ (clobber (reg:CC 17 flags))
+ ]) "hqgybh5a.c":19:10 discrim 1# {*addsi_1}
+ (expr_list:REG_UNUSED (reg:CC 17 flags)
(nil)))
(insn # 0 0 2 (use (reg/i:SI 0 ax)) "hqgybh5a.c":20:1#
(nil))