Message ID | 57617C9A.9020900@foss.arm.com |
---|---|
State | New |
Headers | show |
Kyrill Tkachov <kyrylo.tkachov@foss.arm.com> writes: > diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md > index 6effd7d42d18c9b526aaaec93a44e8801908e164..a19d1711b5bcb516e4aca6a22d1b79df4f32923f 100644 > --- a/gcc/config/aarch64/aarch64-simd.md > +++ b/gcc/config/aarch64/aarch64-simd.md > @@ -3993,15 +3993,12 @@ (define_insn "aarch64_<sur>shll_n<mode>" > "aarch64_simd_shift_imm_bitsize_<ve_mode>" "i")] > VSHLL))] > "TARGET_SIMD" > - "* > - int bit_width = GET_MODE_UNIT_SIZE (<MODE>mode) * BITS_PER_UNIT; > - if (INTVAL (operands[2]) == bit_width) > { > - return \"shll\\t%0.<Vwtype>, %1.<Vtype>, %2\"; > + if (INTVAL (operands[2]) == GET_MODE_UNIT_BITSIZE (<MODE>mode)) > + return "shll\\t%0.<Vwtype>, %1.<Vtype>, %2"; > + else > + return "<sur>shll\\t%0.<Vwtype>, %1.<Vtype>, %2"; You need to unquote the backslashes, too. Andreas.
On 15/06/16 17:12, Andreas Schwab wrote: > Kyrill Tkachov <kyrylo.tkachov@foss.arm.com> writes: > >> diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md >> index 6effd7d42d18c9b526aaaec93a44e8801908e164..a19d1711b5bcb516e4aca6a22d1b79df4f32923f 100644 >> --- a/gcc/config/aarch64/aarch64-simd.md >> +++ b/gcc/config/aarch64/aarch64-simd.md >> @@ -3993,15 +3993,12 @@ (define_insn "aarch64_<sur>shll_n<mode>" >> "aarch64_simd_shift_imm_bitsize_<ve_mode>" "i")] >> VSHLL))] >> "TARGET_SIMD" >> - "* >> - int bit_width = GET_MODE_UNIT_SIZE (<MODE>mode) * BITS_PER_UNIT; >> - if (INTVAL (operands[2]) == bit_width) >> { >> - return \"shll\\t%0.<Vwtype>, %1.<Vtype>, %2\"; >> + if (INTVAL (operands[2]) == GET_MODE_UNIT_BITSIZE (<MODE>mode)) >> + return "shll\\t%0.<Vwtype>, %1.<Vtype>, %2"; >> + else >> + return "<sur>shll\\t%0.<Vwtype>, %1.<Vtype>, %2"; > You need to unquote the backslashes, too. You mean not escape the '\t'? The port uses \\t for tabs, even in {...} templates, though not consistently. That could be cleaned up separately. Kyrill > Andreas. >
diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index 6effd7d42d18c9b526aaaec93a44e8801908e164..a19d1711b5bcb516e4aca6a22d1b79df4f32923f 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -3993,15 +3993,12 @@ (define_insn "aarch64_<sur>shll_n<mode>" "aarch64_simd_shift_imm_bitsize_<ve_mode>" "i")] VSHLL))] "TARGET_SIMD" - "* - int bit_width = GET_MODE_UNIT_SIZE (<MODE>mode) * BITS_PER_UNIT; - if (INTVAL (operands[2]) == bit_width) { - return \"shll\\t%0.<Vwtype>, %1.<Vtype>, %2\"; + if (INTVAL (operands[2]) == GET_MODE_UNIT_BITSIZE (<MODE>mode)) + return "shll\\t%0.<Vwtype>, %1.<Vtype>, %2"; + else + return "<sur>shll\\t%0.<Vwtype>, %1.<Vtype>, %2"; } - else { - return \"<sur>shll\\t%0.<Vwtype>, %1.<Vtype>, %2\"; - }" [(set_attr "type" "neon_shift_imm_long")] ) @@ -4013,15 +4010,12 @@ (define_insn "aarch64_<sur>shll2_n<mode>" (match_operand:SI 2 "immediate_operand" "i")] VSHLL))] "TARGET_SIMD" - "* - int bit_width = GET_MODE_UNIT_SIZE (<MODE>mode) * BITS_PER_UNIT; - if (INTVAL (operands[2]) == bit_width) { - return \"shll2\\t%0.<Vwtype>, %1.<Vtype>, %2\"; + if (INTVAL (operands[2]) == GET_MODE_UNIT_BITSIZE (<MODE>mode)) + return "shll2\\t%0.<Vwtype>, %1.<Vtype>, %2"; + else + return "<sur>shll2\\t%0.<Vwtype>, %1.<Vtype>, %2"; } - else { - return \"<sur>shll2\\t%0.<Vwtype>, %1.<Vtype>, %2\"; - }" [(set_attr "type" "neon_shift_imm_long")] )