This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [AArch64/GCC] PR64304, miscompilation with -mgeneral-regs-only



On 16/01/15 10:50, Marcus Shawcroft wrote:
On 14 January 2015 at 15:31, Jiong Wang <jiong.wang@arm.com> wrote:

2015-01-15 Jiong. Wang (jiong.wang@arm.com)
gcc/
PR64304
   * config/aarch64/aarch64.md (define_insn "*ashl<mode>3_insn"): Deleted.
   (ashl<mode>3): Don't expand if operands[2] is not constant.

gcc/testsuite/
   * gcc.target/aarch64/pr64304.c: New testcase.
@@ -3091,6 +3091,8 @@
      DONE;
            }
        }
+    else
+      DONE;
    }
  )

Did you mean FAIL ?

exactly, thanks, we should use FAIL although DONE and FAIL work the same in this scenario.

I checked their definition, FAIL always return the initial value of _val which is NULL,
while DONE stop and return generated insns which for this pattern happen to be NULL also. that
explain why it's not exposed by testing.


#define FAIL return (end_sequence (), _val)
#define DONE return (_val = get_insns (), end_sequence (), _val)

In the current form this says the expander matched
by no RTL is required to implement the shift.
/Marcus




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]