https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79058
--- Comment #16 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
Or rather this one which avoids triggering an assertion failure in
in_hard_reg_set_p ():
diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1463,6 +1463,7 @@ static bool
simplify_operand_subreg (int nop, machine_mode reg_mode)
{
int hard_regno;
+ int tmp_regno;
rtx_insn *before, *after;
machine_mode mode, innermode;
rtx reg, new_reg;
@@ -1685,8 +1686,14 @@ simplify_operand_subreg (int nop, machine_mode reg_mode)
< hard_regno_nregs[hard_regno][mode])
&& (regclass = lra_get_allocno_class (REGNO (reg)))
&& (type != OP_IN
- || !in_hard_reg_set_p (reg_class_contents[regclass],
- mode, hard_regno)))
+ || (BYTES_BIG_ENDIAN
+ && ((tmp_regno
+ = hard_regno - hard_regno_nregs[hard_regno][mode] + 1)
+ < 0
+ || !HARD_REGISTER_NUM_P (tmp_regno)))
+ || (!in_hard_reg_set_p (reg_class_contents[regclass], mode,
+ (BYTES_BIG_ENDIAN
+ ? tmp_regno : hard_regno)))))
{
/* The class will be defined later in curr_insn_transform. */
enum reg_class rclass