diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cc4f4413f14..87794469c3b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-01-25 Wilco Dijkstra + + PR rtl-optimization/87763 + * config/aarch64/aarch64.c (aarch64_select_cc_mode): + Allow SUBREG when matching CC_NZmode compare. + 2019-01-25 Richard Biener PR tree-optimization/89049 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 5df5a8b7843..8bddff9029b 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -7163,7 +7163,7 @@ aarch64_select_cc_mode (RTX_CODE code, rtx x, rtx y) /* Equality comparisons of short modes against zero can be performed using the TST instruction with the appropriate bitmask. */ - if (y == const0_rtx && REG_P (x) + if (y == const0_rtx && (REG_P (x) || SUBREG_P (x)) && (code == EQ || code == NE) && (mode_x == HImode || mode_x == QImode)) return CC_NZmode;