===================================================================
@@ -1,3 +1,10 @@
+2020-01-10 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR inline-asm/93207
+ * lra-constraints.c (match_reload): Permit input operands have the
+ same mode as output while other input operands have a different
+ mode.
+
2020-01-10 Wilco Dijkstra <wdijkstr@arm.com>
PR tree-optimization/90838
===================================================================
@@ -1054,12 +1054,15 @@ match_reload (signed char out, signed ch
curr_insn_input_reloads[curr_insn_input_reloads_num].match_p = true;
curr_insn_input_reloads[curr_insn_input_reloads_num++].reg = new_in_reg;
for (i = 0; (in = ins[i]) >= 0; i++)
- {
- lra_assert
- (GET_MODE (*curr_id->operand_loc[in]) == VOIDmode
- || GET_MODE (new_in_reg) == GET_MODE (*curr_id->operand_loc[in]));
+ if (GET_MODE (*curr_id->operand_loc[in]) == VOIDmode
+ || GET_MODE (new_in_reg) == GET_MODE (*curr_id->operand_loc[in]))
*curr_id->operand_loc[in] = new_in_reg;
- }
+ else
+ {
+ lra_assert
+ (GET_MODE (new_out_reg) == GET_MODE (*curr_id->operand_loc[in]));
+ *curr_id->operand_loc[in] = new_out_reg;
+ }
lra_update_dups (curr_id, ins);
if (out < 0)
return;
===================================================================
@@ -1,3 +1,8 @@
+2020-01-10 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR inline-asm/93207
+ * gcc.target/i386/pr93207.c: New test.
+
2020-01-10 Wilco Dijkstra <wdijkstr@arm.com>
* testsuite/gcc.target/aarch64/pr90838.c: New test.
===================================================================
@@ -0,0 +1,14 @@
+/* PR inline-asm/93207 */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+int main (void) {
+ int f = 0, w;
+
+ asm volatile(
+ ""
+ : "+m&l"(f)
+ : "0a"(&w)
+ );
+ return 0;
+}