https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90045
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-04-18
CC| |law at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reduced C testcase, fails with -O2, succeeds with -O1:
typedef long unsigned int size_t;
void copy(const void* __restrict__ __a, size_t __n, void* __restrict__ __b)
{
if (__n != 0)
__builtin_memcpy(__b, __a, __n);
}
-O2 failing assembly:
.file "valarray.3.ii"
.section P,"ax"
.global _copy
.type _copy, @function
_copy:
mov.L r2, r14
cmp #0, r14
mov.L r1, r2
bne .L7
rts
.balign 8,3,7
.L7:
mov.L r3, r1
mov.L r14, r3
smovf
rts
.size _copy, .-_copy
.ident "GCC: (GNU) 9.0.1 20190418 (experimental) [trunk revision
269411]"
if I remove the .balign it assembles. Knowing nothing about RX I can't
say if this is to be solved in the assembler or the compiler but I note
that GCC 8 didn't align and the only backend change done for GCC 9 was
re-orgs of the *_ALIGN target macro stuff with
2018-07-17 Martin Liska <[email protected]>
* config/rx/rx.h (JUMP_ALIGN): Wrap integer values
* config/rx/rx-protos.h (rx_align_for_label): Make it
static function.
* config/rx/rx.c (rx_align_for_label): Change return type
to align_flags.
(rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
macro definitions.
into align_flags class.
(LABEL_ALIGN): Likewise.
(LOOP_ALIGN): Likewise.
2018-07-04 Denys Vlasenko <[email protected]>
Martin Liska <[email protected]>
PR middle-end/66240
PR target/45996
PR c/84100
* config/rx/rx.c (rx_option_override): Likewise.
* config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
(LABEL_ALIGN): Use align_labels_log.
(LOOP_ALIGN): Use align_loops_align.
which likely caused this regression.