From d803a4912e3cb9ffcfa57a790d26073bff5086ee Mon Sep 17 00:00:00 2001 From: Ian Bolton Date: Thu, 14 Mar 2013 12:04:26 +0000 Subject: [PATCH] AArch64 should return CC_NZ for AND operation (part 2) From-SVN: r196656 --- gcc/ChangeLog | 5 +++++ gcc/config/aarch64/aarch64.md | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 71c8b9f..19ecdba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2013-03-14 Ian Bolton + * config/aarch64/aarch64.md: (*and3nr_compare0): Use CC_NZ. + (*and_3nr_compare0): Likewise. + +2013-03-14 Ian Bolton + * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return correct CC mode for AND. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 73d86a7..76a5125 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -2547,8 +2547,8 @@ ) (define_insn "*and3nr_compare0" - [(set (reg:CC CC_REGNUM) - (compare:CC + [(set (reg:CC_NZ CC_REGNUM) + (compare:CC_NZ (and:GPI (match_operand:GPI 0 "register_operand" "%r,r") (match_operand:GPI 1 "aarch64_logical_operand" "r,")) (const_int 0)))] @@ -2558,8 +2558,8 @@ (set_attr "mode" "")]) (define_insn "*and_3nr_compare0" - [(set (reg:CC CC_REGNUM) - (compare:CC + [(set (reg:CC_NZ CC_REGNUM) + (compare:CC_NZ (and:GPI (SHIFT:GPI (match_operand:GPI 0 "register_operand" "r") (match_operand:QI 1 "aarch64_shift_imm_" "n")) -- 2.7.4