PR target/87369 * config/aarch64/aarch64.md (aarch64_bfxil): Do not accept constant with just the high bit set. That's better handled by the "bit" pattern. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 88f66104db3..ad6822410c2 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -5342,9 +5342,11 @@ (match_operand:GPI 3 "const_int_operand" "n, Ulc")) (and:GPI (match_operand:GPI 2 "register_operand" "0,r") (match_operand:GPI 4 "const_int_operand" "Ulc, n"))))] - "(INTVAL (operands[3]) == ~INTVAL (operands[4])) - && (aarch64_high_bits_all_ones_p (INTVAL (operands[3])) - || aarch64_high_bits_all_ones_p (INTVAL (operands[4])))" + "(INTVAL (operands[3]) == ~INTVAL (operands[4]) + && ((aarch64_high_bits_all_ones_p (INTVAL (operands[3])) + && popcount_hwi (INTVAL (operands[3])) != 1) + || (aarch64_high_bits_all_ones_p (INTVAL (operands[4])) + && popcount_hwi (INTVAL (operands[4])) != 1)))" { switch (which_alternative) {