diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 4f9faac..2c91542 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -1305,7 +1305,7 @@ " [(set_attr "conds" "set") (set_attr "length" "2,4") - (set (attr "type") (if_then_else (match_operand 2 "const_int_operand" "") + (set (attr "type") (if_then_else (match_operand 1 "const_int_operand" "") (const_string "alus_imm") (const_string "alus_sreg")))] ) diff --git a/gcc/testsuite/gcc.target/arm/pr65924.c b/gcc/testsuite/gcc.target/arm/pr65924.c new file mode 100644 index 0000000..746749f --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr65924.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mthumb" } */ + +int a, b, c; +int fn1() { + if (b + a < 0) + c = 0; +}